equivalent-exchange-3/src/main/java/com/pahimar/ee3/item/ItemBlockAlchemicalChest.java

47 lines
1.3 KiB
Java
Raw Normal View History

package com.pahimar.ee3.item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
2014-05-26 23:27:11 +02:00
import net.minecraft.util.StatCollector;
import java.util.List;
public class ItemBlockAlchemicalChest extends ItemBlock
{
public ItemBlockAlchemicalChest(Block block)
{
super(block);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean flag)
{
// TODO Localize and add more descriptive text
int metaData = itemStack.getItemDamage();
if (metaData == 0)
{
2014-05-26 17:19:19 +02:00
list.add(StatCollector.translateToLocal("tooltip.ee3:alchemicalChestPrefix.small"));
}
else if (metaData == 1)
{
2014-05-26 17:19:19 +02:00
list.add(StatCollector.translateToLocal("tooltip.ee3:alchemicalChestPrefix.medium"));
}
else if (metaData == 2)
{
2014-05-26 17:19:19 +02:00
list.add(StatCollector.translateToLocal("tooltip.ee3:alchemicalChestPrefix.large"));
}
}
}