Files
Chisel/src/main/java/com/cricketcraft/chisel/utils/ItemMetaBlock.java
T
tterrag1098 82792ed22e The great format and clean up. IMPORTANT: Read below.
All devs and contributors should use the provided formatter settings. 
If your IDE does not support the format, the rules are simple, it is the
default java formatting rules, with 200char line lengths and 1 extra
line after class definitions.
2015-01-07 19:50:18 -05:00

29 lines
575 B
Java

package com.cricketcraft.chisel.utils;
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;
}
}