part 1 of converting to using MultiItemBlock where appropriate

This commit is contained in:
Progwml6 committed 2013-12-19 06:32:54 -05:00
1 parent dcd19499bb
commit d65baaecb0
9 files changed
+40 -118

No files matched your search

@@ -1,33 +1,16 @@
package tconstruct.items.blocks;
import java.util.List;
import mantle.blocks.abstracts.MultiItemBlock;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
public class CastingChannelItem extends ItemBlock
public class CastingChannelItem extends MultiItemBlock
{
public static final String blockType[] = { "Channel" };
public static final String blockTypes[] = { "Channel" };
public CastingChannelItem(int id)
{
super(id);
super(id, "Smeltery", 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("Smeltery.").append(blockType[pos]).toString();
}
}