package lumaceon.mods.clockworkphase2.item; import lumaceon.mods.clockworkphase2.ClockworkPhase2; import lumaceon.mods.clockworkphase2.lib.Textures; import lumaceon.mods.clockworkphase2.util.ISimpleNamed; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.text.translation.I18n; public class ItemClockworkPhase extends Item implements ISimpleNamed { String simpleName; public ItemClockworkPhase(int maxStack, int maxDamage, String name) { super(); this.setMaxStackSize(maxStack); this.setMaxDamage(maxDamage); this.setNoRepair(); this.setCreativeTab(ClockworkPhase2.instance.CREATIVE_TAB); this.simpleName = name; this.setRegistryName(name); this.setUnlocalizedName(name); } @Override public String getItemStackDisplayName(ItemStack stack) { return I18n.translateToLocal(this.getUnlocalizedName(stack)); } @Override public String getUnlocalizedName() { return this.getRegistryName().toString(); } @Override public String getUnlocalizedName(ItemStack stack) { return this.getUnlocalizedName(); } @Override public String getSimpleName() { return simpleName; } }