part 2 of conversion to multiItemBlock

This commit is contained in:
Progwml6 committed 2013-12-19 08:15:16 -05:00
1 parent 2ed4c115e4
commit 51e0833ae8
24 files changed
+93 -335

No files matched your search

@@ -2,34 +2,24 @@ package tconstruct.items.blocks;
import java.util.List;
import mantle.blocks.abstracts.MultiItemBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
public class MetalOreItemBlock extends ItemBlock
public class MetalOreItemBlock extends MultiItemBlock
{
public static final String blockType[] = { "NetherSlag", "Cobalt", "Ardite", "Copper", "Tin", "Aluminum", "Slag" };
public static final String blockTypes[] = { "NetherSlag", "Cobalt", "Ardite", "Copper", "Tin", "Aluminum", "Slag" };
public MetalOreItemBlock(int id)
{
super(id);
super(id, "MetalOre", blockTypes);
setMaxDamage(0);
setHasSubtypes(true);
}
public int getMetadata (int meta)
{
return meta;
}
public String getUnlocalizedName (ItemStack itemstack)
{
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
return (new StringBuilder()).append("MetalOre.").append(blockType[pos]).toString();
}
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
{
if (stack.hasTagCompound())