diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java | 65 |
1 files changed, 21 insertions, 44 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java index 2e11b11b2f..e3401dcbc8 100644 --- a/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java +++ b/src/main/java/gtPlusPlus/xmod/ic2/item/IC2_ItemIC2.java @@ -1,17 +1,19 @@ 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.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; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; + public class IC2_ItemIC2 extends Item { + public IC2_ItemIC2(final String internalName) { this.setUnlocalizedName(internalName); this.setCreativeTab(AddToCreativeTab.tabMachines); @@ -24,45 +26,20 @@ public class IC2_ItemIC2 extends Item { return null; } - /* 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 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]; } + */ @Override public String getUnlocalizedName() { |