From cbe0e497be8e466c380a5b4fa781b314ede9ada3 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 6 Nov 2016 19:32:27 +1000 Subject: Revert "$ Cleaned up the entire project." This reverts commit 0669f5eb9d5029a8b94ec552171b0837605f7747. # Conflicts: # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java Revert "% Cleaned up Imports." This reverts commit 3654052fb63a571c5eaca7f20714b87c17f7e966. --- src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java | 130 +++++++++++++-------- 1 file changed, 79 insertions(+), 51 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java') diff --git a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java index d7cb77ee40..852830dc5c 100644 --- a/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java +++ b/src/Java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java @@ -1,76 +1,104 @@ package gtPlusPlus.xmod.ic2.item; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; -import net.minecraft.item.*; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class IC2_ItemIC2 extends Item { - private int rarity = 0; - - protected IIcon[] textures; - - /* - * public String getTextureName(int index) { if ((!this.hasSubtypes) && - * (index > 0)) { return null; } String name = getUnlocalizedName(new - * ItemStack(this, 1, index)); if ((name != null) && (name.length() > 4)) { - * return name.substring(4); } return name; } - * - * @Override - * - * @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister - * iconRegister) { int indexCount = 0; while (getTextureName(indexCount) != - * null) { indexCount++; if (indexCount > 32767) { throw new - * RuntimeException("More Item Icons than actually possible @ " + - * getUnlocalizedName()); } } this.textures = new IIcon[indexCount]; for - * (int index = 0; index < indexCount; index++) { this.textures[index] = - * iconRegister.registerIcon(CORE.MODID + ":" + getUnlocalizedName()); } } - * - * @Override - * - * @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int meta) { if - * (meta < this.textures.length) { return this.textures[meta]; } return - * this.textures.length < 1 ? null : this.textures[0]; } - */ - - public IC2_ItemIC2(final String internalName) { - this.setUnlocalizedName(internalName); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setTextureName(CORE.MODID + ":" + internalName); +public class IC2_ItemIC2 +extends Item +{ + public IC2_ItemIC2(String internalName) + { + setUnlocalizedName(internalName); + setCreativeTab(AddToCreativeTab.tabMachines); + setTextureName(CORE.MODID + ":" + internalName); GameRegistry.registerItem(this, internalName); } - @Override - public String getItemStackDisplayName(final ItemStack itemStack) { - return StatCollector.translateToLocal(this.getUnlocalizedName(itemStack)); + public String getTextureFolder() + { + return null; } - @Override - @SideOnly(Side.CLIENT) - public EnumRarity getRarity(final ItemStack stack) { - return EnumRarity.values()[this.rarity]; - } + /* public String getTextureName(int index) + { + if ((!this.hasSubtypes) && (index > 0)) { + return null; + } + String name = getUnlocalizedName(new ItemStack(this, 1, index)); + if ((name != null) && (name.length() > 4)) { + return name.substring(4); + } + return name; + } - public String getTextureFolder() { - return null; - } + @Override +@SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) + { + int indexCount = 0; + while (getTextureName(indexCount) != null) + { + indexCount++; + if (indexCount > 32767) { + throw new RuntimeException("More Item Icons than actually possible @ " + getUnlocalizedName()); + } + } + this.textures = new IIcon[indexCount]; + for (int index = 0; index < indexCount; index++) { + this.textures[index] = iconRegister.registerIcon(CORE.MODID + ":" + getUnlocalizedName()); + } + } + + @Override +@SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) + { + if (meta < this.textures.length) { + return this.textures[meta]; + } + return this.textures.length < 1 ? null : this.textures[0]; + }*/ @Override - public String getUnlocalizedName() { + public String getUnlocalizedName() + { return super.getUnlocalizedName(); } @Override - public String getUnlocalizedName(final ItemStack itemStack) { - return this.getUnlocalizedName(); + public String getUnlocalizedName(ItemStack itemStack) + { + return getUnlocalizedName(); + } + + @Override + public String getItemStackDisplayName(ItemStack itemStack) + { + return StatCollector.translateToLocal(getUnlocalizedName(itemStack)); } - public IC2_ItemIC2 setRarity(final int aRarity) { + + public IC2_ItemIC2 setRarity(int aRarity) + { this.rarity = aRarity; return this; } + + @Override + @SideOnly(Side.CLIENT) + public EnumRarity getRarity(ItemStack stack) + { + return EnumRarity.values()[this.rarity]; + } + + private int rarity = 0; + protected IIcon[] textures; } -- cgit