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

46 lines
1.3 KiB
Java
Raw Normal View History

package com.pahimar.ee3.item;
2023-01-03 17:47:36 +01:00
import java.util.List;
import com.pahimar.ee3.reference.Messages;
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;
2023-01-03 17:47:36 +01:00
public class ItemBlockAlchemicalChest extends ItemBlock {
public ItemBlockAlchemicalChest(Block block) {
super(block);
this.setHasSubtypes(true);
}
@Override
2023-01-03 17:47:36 +01:00
public int getMetadata(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
2023-01-03 17:47:36 +01:00
public void addInformation(
ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean flag
) {
int metaData = itemStack.getItemDamage();
2023-01-03 17:47:36 +01:00
if (metaData == 0) {
list.add(StatCollector.translateToLocal(
StatCollector.translateToLocal(Messages.Tooltips.SMALL)
));
} else if (metaData == 1) {
list.add(StatCollector.translateToLocal(
StatCollector.translateToLocal(Messages.Tooltips.MEDIUM)
));
} else if (metaData == 2) {
list.add(StatCollector.translateToLocal(
StatCollector.translateToLocal(Messages.Tooltips.LARGE)
));
}
}
}