mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
part 1 of converting to using MultiItemBlock where appropriate
This commit is contained in:
1 parent
dcd19499bb
commit
d65baaecb0
9 files changed
+40
-118
No files matched your search
@@ -2,6 +2,7 @@ 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;
|
||||
@@ -9,27 +10,18 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class LavaTankItemBlock extends ItemBlock
|
||||
public class LavaTankItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockType[] = { "Tank", "Gague", "Window" };
|
||||
public static final String blockTypes[] = { "Tank", "Gague", "Window" };
|
||||
|
||||
public LavaTankItemBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
super(id, "LavaTank", 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("LavaTank.").append(blockType[pos]).toString();
|
||||
}
|
||||
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user