mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-13 16:54:13 +00:00
27 lines
575 B
Java
27 lines
575 B
Java
package info.jbcs.minecraft.utilities;
|
|||
|
|
|
||
|
|
import net.minecraft.block.Block;
|
||
|
|
import net.minecraft.item.ItemBlock;
|
||
|
|
import net.minecraft.item.ItemStack;
|
||
|
|
|
||
|
|
public class ItemMetaBlock extends ItemBlock {
|
||
|
|
public ItemMetaBlock(Block b) {
|
||
|
|
super(b);
|
||
|
|
setMaxDamage(0);
|
||
|
|
setHasSubtypes(true);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public String getUnlocalizedName(ItemStack itemstack) {
|
||
|
|
if (itemstack == null) {
|
||
|
|
return Block.getBlockFromItem(this).getUnlocalizedName();
|
||
|
|
}
|
||
|
|
|
||
|
|
return Block.getBlockFromItem(this).getUnlocalizedName();
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getMetadata(int i) {
|
||
|
|
return i;
|
||
|
|
}
|
||
|
|
}
|