Posted January 9, 201411 yr What must I change, that the texture for my armor will load from my folder and not from the 1.6.4.jar like Twilight Forest Mod do it. Here is my code: SCItem public class SCItem { // creative tabs public static CreativeTabs CreativeTabSCBlocks = new CreativeTabSCBlocks(CreativeTabs.getNextID(), "Building Blocks"){}; public static CreativeTabs CreativeTabSCMaterials = new CreativeTabSCMaterials(CreativeTabs.getNextID(), "Materials"){}; public static CreativeTabs CreativeTabSCFood = new CreativeTabSCFood(CreativeTabs.getNextID(), "Foodstuffs"){}; public static CreativeTabs CreativeTabSCTool = new CreativeTabSCTool(CreativeTabs.getNextID(), "Tools"){}; public static CreativeTabs CreativeTabSCCombat = new CreativeTabSCCombat(CreativeTabs.getNextID(), "Combat"){}; // Uranium armor public static Item helmetUranium; public static Item plateUranium; public static Item legsUranium; public static Item bootsUranium; // Copper armor public static Item helmetCopper; public static Item plateCopper; public static Item legsCopper; public static Item bootsCopper; // Unobtanium armor public static Item helmetUnobtanium; public static Item plateUnobtanium; public static Item legsUnobtanium; public static Item bootsUnobtanium; // Enum Armor Material public static EnumArmorMaterial ARMOR_URANIUM = net.minecraftforge.common.EnumHelper.addArmorMaterial("URANIUM", 18, new int[] { 2, 7, 5, 2 }, 9); public static EnumArmorMaterial ARMOR_COPPER = net.minecraftforge.common.EnumHelper.addArmorMaterial("COPPER", 8, new int[] { 2, 4, 3, 1 }, 28); public static EnumArmorMaterial UNOBTANIUM = net.minecraftforge.common.EnumHelper.addArmorMaterial("UNOBTANIUM", 35, new int[] { 4, 10, 8, 4 }, 12); public static EnumArmorMaterial Arnomr = EnumHelper.addArmorMaterial("Unob", 8, new int[] {2, 5, 6, 1}, 30); // renderer int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UraniumArmor_"); int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/CopperArmor_"); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UnobtaniumArmor_"); public SCItem() { // define uranium armor helmetUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemHelmetUranium, ARMOR_URANIUM, uraniumRenderID, 0)).setUnlocalizedName("helmetUranium"); plateUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemPlateUranium, ARMOR_URANIUM, uraniumRenderID, 1)).setUnlocalizedName("plateUranium"); legsUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemLegsUranium, ARMOR_URANIUM, uraniumRenderID, 2)).setUnlocalizedName("legsUranium"); bootsUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemBootsUranium, ARMOR_URANIUM, uraniumRenderID, 3)).setUnlocalizedName("bootsUranium"); // define copper armor helmetCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemHelmetCopper, ARMOR_COPPER, copperRenderID, 0)).setUnlocalizedName("helmetCopper"); plateCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemPlateCopper, ARMOR_COPPER, copperRenderID, 1)).setUnlocalizedName("plateCopper"); legsCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemLegsCopper, ARMOR_COPPER, copperRenderID, 2)).setUnlocalizedName("legsCopper"); bootsCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemBootsCopper, ARMOR_COPPER, copperRenderID, 3)).setUnlocalizedName("bootsCopper"); // define unobtanium armor helmetUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemHelmetUnobtanium, UNOBTANIUM, unobtaniumRenderID, 0)).setUnlocalizedName("helmetUnobtanium"); plateUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemPlateUnobtanium, UNOBTANIUM, unobtaniumRenderID, 1)).setUnlocalizedName("plateUnobtanium"); legsUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemLegsUnobtanium, UNOBTANIUM, unobtaniumRenderID, 2)).setUnlocalizedName("legsUnobtanium"); bootsUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemBootsUnobtanium, UNOBTANIUM, unobtaniumRenderID, 3)).setUnlocalizedName("bootsUnobtanium"); // register uranium armor registerSCItems(helmetUranium, "helmetUranium"); registerSCItems(plateUranium, "plateUranium"); registerSCItems(legsUranium, "legsUranium"); registerSCItems(bootsUranium, "bootsUranium"); // register copper armor registerSCItems(helmetCopper, "helmetCopper"); registerSCItems(plateCopper, "plateCopper"); registerSCItems(legsCopper, "legsCopper"); registerSCItems(bootsCopper, "bootsCopper"); // register unobtanium armor registerSCItems(helmetUnobtanium, "helmetUnobtanium"); registerSCItems(plateUnobtanium, "plateUnobtanium"); registerSCItems(legsUnobtanium, "legsUnobtanium"); registerSCItems(bootsUnobtanium, "bootsUnobtanium"); } // register items private void registerSCItems(Item item, String englishName) { GameRegistry.registerItem(item, item.getUnlocalizedName(), "serocraft"); } ClientProxy package minecraftplaye.serocraft; import net.minecraft.client.renderer.entity.RenderBiped; import minecraftplaye.serocraft.entity.EntitySCMutant; import minecraftplaye.serocraft.entity.model.ModelSCMutant; import minecraftplaye.serocraft.entity.render.RenderSCMutant; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class SCClientProxy extends SCCommonProxy { public SCClientProxy() { } public void doPreLoadRegistration() { } public void registerRenderInformation() { //RenderingRegistry.registerEntityRenderingHandler(EntityAngryBat.class, new RenderAngryBat()); RenderingRegistry.registerEntityRenderingHandler(EntitySCMutant.class, new RenderBiped(new ModelSCMutant(), 0.625F)); } public void doOnLoadRegistration() { } public int registerArmorRenderID(String prefix) { return RenderingRegistry.addNewArmourRendererPrefix(prefix); } } CommonProxy package minecraftplaye.serocraft; import minecraftplaye.serocraft.entity.EntitySCMutant; import cpw.mods.fml.common.registry.EntityRegistry; public class SCCommonProxy { public void doPreLoadRegistration() { } public void init() { EntityRegistry.registerGlobalEntityID(EntitySCMutant.class, "Mutant", EntityRegistry.findGlobalUniqueEntityId(), 424313, 45131); //registerRenderInformation(); } public void registerRenderInformation() { // Nothing here as the server doesn't render graphics } public int registerArmorRenderID(String string) // registerArmorRenderID { return 0; } } ItemSCUnobtaniumArmor package minecraftplaye.serocraft.items; import minecraftplaye.serocraft.SeroCraft; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ItemSCUnobtaniumArmor extends ItemArmor { public ItemSCUnobtaniumArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int renderIndex, int armorType) { super(par1, par2EnumArmorMaterial, renderIndex, armorType); this.setCreativeTab(SCItem.CreativeTabSCCombat); } public String getArmorTextureFile(ItemStack itemstack, Entity entity, int slot, int layer) { if (itemstack.itemID == SCItem.helmetUnobtanium.itemID || itemstack.itemID == SCItem.plateUnobtanium.itemID || itemstack.itemID == SCItem.bootsUnobtanium.itemID) { //return "serocraft:UnobtaniumArmor_layer_1.png"; //return SeroCraft.ARMOR_DIR + "UnobtaniumArmor_1.png"; return "serocraft:textures/armor/UnobtaniumArmor_1.png"; } if (itemstack.itemID == SCItem.legsUnobtanium.itemID) { //return "serocraft:UnobtaniumArmor_layer_2.png"; //return SeroCraft.ARMOR_DIR + "UnobtaniumArmor_2.png"; return "serocraft:textures/armor/UnobtaniumArmor_2.png"; } else { return "serocraft:textures/armor/UnobtaniumArmor_1.png"; } } public void registerIcons(IconRegister reg) { // Make sure to import IconRegister! if (itemID == SCItem.plateUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "plateUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.legsUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "legsUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.bootsUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "bootsUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.helmetUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "helmetUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } } public EnumRarity func_77613_e(ItemStack par1ItemStack) { return EnumRarity.uncommon; } } With this code, I get every time this error: 2014-01-09 19:38:51 [Warnung] [Minecraft-Client] Failed to load texture: minecraft:textures/models/armor/serocraft/UnobtaniumArmor__layer_1.png java.io.FileNotFoundException: minecraft:textures/models/armor/serocraft/UnobtaniumArmor__layer_1.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:64) at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:53) at net.minecraft.client.renderer.entity.RenderPlayer.setArmorModel(RenderPlayer.java:72) at net.minecraft.client.renderer.entity.RenderPlayer.shouldRenderPass(RenderPlayer.java:514) at net.minecraft.client.renderer.entity.RendererLivingEntity.doRenderLiving(RendererLivingEntity.java:164) at net.minecraft.client.renderer.entity.RenderPlayer.func_130009_a(RenderPlayer.java:166) at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:556) at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312) at net.minecraft.client.gui.inventory.GuiInventory.func_110423_a(GuiInventory.java:121) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:849) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:683) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944) at net.minecraft.client.Minecraft.run(Minecraft.java:836) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) 2014-01-09 19:38:51 [Warnung] [Minecraft-Client] Failed to load texture: minecraft:textures/models/armor/serocraft/UnobtaniumArmor__layer_2.png java.io.FileNotFoundException: minecraft:textures/models/armor/serocraft/UnobtaniumArmor__layer_2.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:64) at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:53) at net.minecraft.client.renderer.entity.RenderPlayer.setArmorModel(RenderPlayer.java:72) at net.minecraft.client.renderer.entity.RenderPlayer.shouldRenderPass(RenderPlayer.java:514) at net.minecraft.client.renderer.entity.RendererLivingEntity.doRenderLiving(RendererLivingEntity.java:164) at net.minecraft.client.renderer.entity.RenderPlayer.func_130009_a(RenderPlayer.java:166) at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:556) at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312) at net.minecraft.client.gui.inventory.GuiInventory.func_110423_a(GuiInventory.java:121) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:849) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:683) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944) at net.minecraft.client.Minecraft.run(Minecraft.java:836) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) I hope that you can help me. Developer of Primeval Forest.
January 9, 201411 yr That DOES help. Here's your problem: int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UraniumArmor_"); int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/CopperArmor_"); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UnobtaniumArmor_"); Compare and contrast to "serocraft:textures/armor/UnobtaniumArmor_1.png"; Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
January 11, 201411 yr Try this: int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/armor/UraniumArmor"); int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/armor/CopperArmor"); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/armor/UnobtaniumArmor"); The problem is that "_layer_#.png" is already added, so "serocraft/Armor_" makes Minecraft look for textures in "minecraft:textures/models/armor/serocraft/Armor__layer_#.png" (two underscores after "Armor"). Also, put your armor textures in "serocraft:textures/models/armor" rather than "serocraft:textures/armor". You might need to change some code here and there, but it helps with compatibility. Before you even think about modding, please learn basic Java.
January 11, 201411 yr Author This won't work: Failed to load texture: textures/models/armor/serocraft:textures/models/armor/UnobtaniumArmor_layer_1.png Failed to load texture: textures/models/armor/serocraft:textures/models/armor/UnobtaniumArmor_layer_2.png My code: (SCItem) package minecraftplaye.serocraft.items; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionHelper; import net.minecraftforge.common.EnumHelper; import minecraftplaye.serocraft.SeroCraft; import minecraftplaye.serocraft.config.SCConfigurationIDs; import minecraftplaye.serocraft.helpers.creative.*; public class SCItem { // Items public static Item copperIngot; public static Item uraniumPowder; public static Item uraniumIngot; public static Item smeltingglass; public static Item unobtaniumIngot; public static Item mutantFlesh; public static Item lighter; // creative tabs public static CreativeTabs CreativeTabSCBlocks = new CreativeTabSCBlocks(CreativeTabs.getNextID(), "Building Blocks"){}; public static CreativeTabs CreativeTabSCMaterials = new CreativeTabSCMaterials(CreativeTabs.getNextID(), "Materials"){}; public static CreativeTabs CreativeTabSCFood = new CreativeTabSCFood(CreativeTabs.getNextID(), "Foodstuffs"){}; public static CreativeTabs CreativeTabSCTool = new CreativeTabSCTool(CreativeTabs.getNextID(), "Tools"){}; public static CreativeTabs CreativeTabSCCombat = new CreativeTabSCCombat(CreativeTabs.getNextID(), "Combat"){}; // Uranium tools and weapons public static Item pickaxeUranium; public static Item axeUranium; public static Item spadeUranium; public static Item hoeUranium; public static Item swordUranium; // Copper tools and weapons public static Item pickaxeCopper; public static Item axeCopper; public static Item spadeCopper; public static Item hoeCopper; public static Item swordCopper; // Unobtanium tools and weapons public static Item pickaxeUnobtanium; public static Item axeUnobtanium; public static Item spadeUnobtanium; public static Item hoeUnobtanium; public static Item swordUnobtanium; // Uranium armor public static Item helmetUranium; public static Item plateUranium; public static Item legsUranium; public static Item bootsUranium; // Copper armor public static Item helmetCopper; public static Item plateCopper; public static Item legsCopper; public static Item bootsCopper; // Unobtanium armor public static Item helmetUnobtanium; public static Item plateUnobtanium; public static Item legsUnobtanium; public static Item bootsUnobtanium; // Enum Tool Material public static EnumToolMaterial TOOL_URANIUM = net.minecraftforge.common.EnumHelper.addToolMaterial("URANIUM", 2, 250, 6.5F, 1, 10); public static EnumToolMaterial TOOL_Copper = net.minecraftforge.common.EnumHelper.addToolMaterial("COPPER", 0, 36, 12.0F, 0, 22); public static EnumToolMaterial TOOL_UNOBTANIUM = net.minecraftforge.common.EnumHelper.addToolMaterial("UNOBTANIUM", 4, 1600, 8.5F, 4, 12); // Enum Armor Material public static EnumArmorMaterial ARMOR_URANIUM = net.minecraftforge.common.EnumHelper.addArmorMaterial("URANIUM", 18, new int[] { 2, 7, 5, 2 }, 9); public static EnumArmorMaterial ARMOR_COPPER = net.minecraftforge.common.EnumHelper.addArmorMaterial("COPPER", 8, new int[] { 2, 4, 3, 1 }, 28); public static EnumArmorMaterial UNOBTANIUM = net.minecraftforge.common.EnumHelper.addArmorMaterial("UNOBTANIUM", 35, new int[] { 4, 10, 8, 4 }, 12); public static EnumArmorMaterial Arnomr = EnumHelper.addArmorMaterial("Unob", 8, new int[] {2, 5, 6, 1}, 30); // renderer //int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UraniumArmor_"); //int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/CopperArmor_"); //int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UnobtaniumArmor_"); int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/models/armor/UraniumArmor"); int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/models/armor/CopperArmor"); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft:textures/models/armor/UnobtaniumArmor"); public SCItem() { // define Items copperIngot = new ItemSC(SCConfigurationIDs.idItemCopperIngot).setCreativeTab(SCItem.CreativeTabSCMaterials).setUnlocalizedName("copperIngot"); uraniumPowder = new ItemSC(SCConfigurationIDs.idItemUraniumDust).setCreativeTab(SCItem.CreativeTabSCMaterials).setUnlocalizedName("uraniumPowder"); uraniumIngot = new ItemSC(SCConfigurationIDs.idItemUraniumIngot).setCreativeTab(SCItem.CreativeTabSCMaterials).setUnlocalizedName("uraniumIngot"); smeltingglass = new ItemSC(SCConfigurationIDs.idItemSmeltingglass).setCreativeTab(SCItem.CreativeTabSCMaterials).setUnlocalizedName("smeltingglass"); unobtaniumIngot = new ItemSC(SCConfigurationIDs.idItemUnobtaniumIngot).setCreativeTab(SCItem.CreativeTabSCMaterials).setUnlocalizedName("unobtaniumIngot"); mutantFlesh = (new ItemSCFood(SCConfigurationIDs.idItemMutantFlesh, -6, 0.9F, false)).setPotionEffect(Potion.poison.id, 600, 3, 9.0F).setPotionEffect(PotionHelper.spiderEyeEffect).setUnlocalizedName("mutantFlesh"); lighter = new ItemSCLighter(SCConfigurationIDs.idItemSCLighter).setUnlocalizedName("lighter"); // define uranium tools and weapons pickaxeUranium = (new ItemSCPick(SCConfigurationIDs.idItemUraniumPick, TOOL_URANIUM)).setMaxStackSize(1).setUnlocalizedName("pickaxeUranium"); axeUranium = (new ItemSCAxe(SCConfigurationIDs.idItemUraniumAxe, TOOL_URANIUM)).setMaxStackSize(1).setUnlocalizedName("axeUranium"); spadeUranium = (new ItemSCSpade(SCConfigurationIDs.idItemUraniumSpade, TOOL_URANIUM)).setMaxStackSize(1).setUnlocalizedName("spadeUranium"); hoeUranium = (new ItemSCHoe(SCConfigurationIDs.idItemUraniumHoe, TOOL_URANIUM)).setMaxStackSize(1).setUnlocalizedName("hoeUranium"); swordUranium = (new ItemSCSword(SCConfigurationIDs.idItemUraniumSword, TOOL_URANIUM)).setMaxStackSize(1).setUnlocalizedName("swordUranium"); // define copper tools and weapons pickaxeCopper = (new ItemSCPick(SCConfigurationIDs.idItemCopperPick, TOOL_Copper)).setMaxStackSize(1).setUnlocalizedName("pickaxeCopper"); axeCopper = (new ItemSCAxe(SCConfigurationIDs.idItemCopperAxe, TOOL_Copper)).setMaxStackSize(1).setUnlocalizedName("axeCopper"); spadeCopper = (new ItemSCSpade(SCConfigurationIDs.idItemCopperSpade, TOOL_Copper)).setMaxStackSize(1).setUnlocalizedName("spadeCopper"); hoeCopper = (new ItemSCHoe(SCConfigurationIDs.idItemCopperHoe, TOOL_Copper)).setMaxStackSize(1).setUnlocalizedName("hoeCopper"); swordCopper = (new ItemSCSword(SCConfigurationIDs.idItemCopperSword, TOOL_Copper)).setMaxStackSize(1).setUnlocalizedName("swordCopper"); // define unobtanium tools and weapons pickaxeUnobtanium = (new ItemSCPick(SCConfigurationIDs.idItemUnobtaniumPick, TOOL_UNOBTANIUM)).setMaxStackSize(1).setUnlocalizedName("pickaxeUnobtanium"); axeUnobtanium = (new ItemSCAxe(SCConfigurationIDs.idItemUnobtaniumAxe, TOOL_UNOBTANIUM)).setMaxStackSize(1).setUnlocalizedName("axeUnobtanium"); spadeUnobtanium = (new ItemSCSpade(SCConfigurationIDs.idItemUnobtaniumSpade, TOOL_UNOBTANIUM)).setMaxStackSize(1).setUnlocalizedName("spadeUnobtanium"); hoeUnobtanium = (new ItemSCHoe(SCConfigurationIDs.idItemUnobtaniumHoe, TOOL_UNOBTANIUM)).setMaxStackSize(1).setUnlocalizedName("hoeUnobtanium"); swordUnobtanium = (new ItemSCSword(SCConfigurationIDs.idItemUnobtaniumSword, TOOL_UNOBTANIUM)).setMaxStackSize(1).setUnlocalizedName("swordUnobtanium"); // define uranium armor helmetUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemHelmetUranium, ARMOR_URANIUM, uraniumRenderID, 0)).setUnlocalizedName("helmetUranium"); plateUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemPlateUranium, ARMOR_URANIUM, uraniumRenderID, 1)).setUnlocalizedName("plateUranium"); legsUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemLegsUranium, ARMOR_URANIUM, uraniumRenderID, 2)).setUnlocalizedName("legsUranium"); bootsUranium = (new ItemSCUraniumArmor(SCConfigurationIDs.idItemBootsUranium, ARMOR_URANIUM, uraniumRenderID, 3)).setUnlocalizedName("bootsUranium"); // define copper armor helmetCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemHelmetCopper, ARMOR_COPPER, copperRenderID, 0)).setUnlocalizedName("helmetCopper"); plateCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemPlateCopper, ARMOR_COPPER, copperRenderID, 1)).setUnlocalizedName("plateCopper"); legsCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemLegsCopper, ARMOR_COPPER, copperRenderID, 2)).setUnlocalizedName("legsCopper"); bootsCopper = (new ItemSCCopperArmor(SCConfigurationIDs.idItemBootsCopper, ARMOR_COPPER, copperRenderID, 3)).setUnlocalizedName("bootsCopper"); // define unobtanium armor helmetUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemHelmetUnobtanium, UNOBTANIUM, unobtaniumRenderID, 0)).setUnlocalizedName("helmetUnobtanium"); plateUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemPlateUnobtanium, UNOBTANIUM, unobtaniumRenderID, 1)).setUnlocalizedName("plateUnobtanium"); legsUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemLegsUnobtanium, UNOBTANIUM, unobtaniumRenderID, 2)).setUnlocalizedName("legsUnobtanium"); bootsUnobtanium = (new ItemSCUnobtaniumArmor(SCConfigurationIDs.idItemBootsUnobtanium, UNOBTANIUM, unobtaniumRenderID, 3)).setUnlocalizedName("bootsUnobtanium"); // rendering Armor on players body //RenderingRegistry.addNewArmourRendererPrefix("ARMOR_URANIUM"); //RenderingRegistry.addNewArmourRendererPrefix("ARMOR_COPPER"); //RenderingRegistry.addNewArmourRendererPrefix("ARMOR_UNOBTANIUM"); // register Items registerSCItems(copperIngot, "copperIngot"); registerSCItems(uraniumPowder, "uraniumDust"); registerSCItems(uraniumIngot, "uraniumIngot"); registerSCItems(unobtaniumIngot, "unobtaniumIngot"); registerSCItems(smeltingglass, "smeltingglass"); registerSCItems(mutantFlesh, "mutantFlesh"); registerSCItems(lighter, "lighter"); // register uranium tools and weapons registerSCItems(pickaxeUranium, "pickaxeUranium"); registerSCItems(axeUranium, "axeUranium"); registerSCItems(spadeUranium, "spadeUranium"); registerSCItems(hoeUranium, "hoeUranium"); registerSCItems(swordUranium, "swordUranium"); // register copper tools and weapons registerSCItems(pickaxeCopper, "pickaxeCopper"); registerSCItems(axeCopper, "axeCopper"); registerSCItems(spadeCopper, "spadeCopper"); registerSCItems(hoeCopper, "hoeCopper"); registerSCItems(swordCopper, "swordCopper"); // register unobtanium tools and weapons registerSCItems(pickaxeUnobtanium, "pickaxeUnobtanium"); registerSCItems(axeUnobtanium, "axeUnobtanium"); registerSCItems(spadeUnobtanium, "spadeUnobtanium"); registerSCItems(hoeUnobtanium, "hoeUnobtanium"); registerSCItems(swordUnobtanium, "swordUnobtanium"); // register uranium armor registerSCItems(helmetUranium, "helmetUranium"); registerSCItems(plateUranium, "plateUranium"); registerSCItems(legsUranium, "legsUranium"); registerSCItems(bootsUranium, "bootsUranium"); // register copper armor registerSCItems(helmetCopper, "helmetCopper"); registerSCItems(plateCopper, "plateCopper"); registerSCItems(legsCopper, "legsCopper"); registerSCItems(bootsCopper, "bootsCopper"); // register unobtanium armor registerSCItems(helmetUnobtanium, "helmetUnobtanium"); registerSCItems(plateUnobtanium, "plateUnobtanium"); registerSCItems(legsUnobtanium, "legsUnobtanium"); registerSCItems(bootsUnobtanium, "bootsUnobtanium"); Language_en_US(); Language_de_DE(); } public void Language_en_US() { LanguageRegistry.instance().addNameForObject(lighter, "en_US", "Lighter - \u00a74Only to create a portal!"); LanguageRegistry.instance().addNameForObject(uraniumPowder, "en_US", "\u00a7aUranium Dust"); } public void Language_de_DE() { LanguageRegistry.instance().addNameForObject(lighter, "de_DE", "Feuerzeug - \u00a74Nur zum erstellen eines Portals!"); LanguageRegistry.instance().addNameForObject(uraniumPowder, "de_DE", "\u00a7aUranstaub"); } // register items private void registerSCItems(Item item, String englishName) { GameRegistry.registerItem(item, item.getUnlocalizedName(), "serocraft"); } } ItemSCUnobtaniumArmor package minecraftplaye.serocraft.items; import minecraftplaye.serocraft.SeroCraft; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ItemSCUnobtaniumArmor extends ItemArmor { public ItemSCUnobtaniumArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int renderIndex, int armorType) { super(par1, par2EnumArmorMaterial, renderIndex, armorType); this.setCreativeTab(SCItem.CreativeTabSCCombat); } public String getArmorTextureFile(ItemStack itemstack, Entity entity, int slot, int layer) { if (itemstack.itemID == SCItem.helmetUnobtanium.itemID || itemstack.itemID == SCItem.plateUnobtanium.itemID || itemstack.itemID == SCItem.bootsUnobtanium.itemID) { //return "serocraft:UnobtaniumArmor_layer_1.png"; //return SeroCraft.ARMOR_DIR + "UnobtaniumArmor_1.png"; return "serocraft:textures/models/armor/UnobtaniumArmor_1.png"; } if (itemstack.itemID == SCItem.legsUnobtanium.itemID) { //return "serocraft:UnobtaniumArmor_layer_2.png"; //return SeroCraft.ARMOR_DIR + "UnobtaniumArmor_2.png"; return "serocraft:textures/models/armor/UnobtaniumArmor_2.png"; } else { return "serocraft:textures/models/armor/UnobtaniumArmor_1.png"; } } public void registerIcons(IconRegister reg) { // Make sure to import IconRegister! if (itemID == SCItem.plateUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "plateUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.legsUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "legsUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.bootsUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "bootsUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } if (itemID == SCItem.helmetUnobtanium.itemID) { this.itemIcon = reg.registerIcon(SeroCraft.modid + ":" + "helmetUnobtanium"); // You can also replace blockID and blockIcon with itemID and itemIcon } } public EnumRarity func_77613_e(ItemStack par1ItemStack) { return EnumRarity.uncommon; } } SCClientProxy package minecraftplaye.serocraft; import net.minecraft.client.renderer.entity.RenderBiped; import minecraftplaye.serocraft.entity.EntitySCMutant; import minecraftplaye.serocraft.entity.model.ModelSCMutant; import minecraftplaye.serocraft.entity.render.RenderSCMutant; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class SCClientProxy extends SCCommonProxy { public SCClientProxy() { } public void doPreLoadRegistration() { } public void registerRenderInformation() { //RenderingRegistry.registerEntityRenderingHandler(EntityAngryBat.class, new RenderAngryBat()); RenderingRegistry.registerEntityRenderingHandler(EntitySCMutant.class, new RenderBiped(new ModelSCMutant(), 0.625F)); } public void doOnLoadRegistration() { } public int registerArmorRenderID(String prefix) { return RenderingRegistry.addNewArmourRendererPrefix(prefix); } } SCCommonProxy package minecraftplaye.serocraft; import minecraftplaye.serocraft.entity.EntitySCMutant; import cpw.mods.fml.common.registry.EntityRegistry; public class SCCommonProxy { public void doPreLoadRegistration() { } public void init() { EntityRegistry.registerGlobalEntityID(EntitySCMutant.class, "Mutant", EntityRegistry.findGlobalUniqueEntityId(), 424313, 45131); //registerRenderInformation(); } public void registerRenderInformation() { // Nothing here as the server doesn't render graphics } public int registerArmorRenderID(String string) // registerArmorRenderID { return 0; } } I hope that this will help you. Developer of Primeval Forest.
January 11, 201411 yr How is your assets folder laid out? You need a models folder in there like block and item. assets/ModID/textures/models/armor
January 11, 201411 yr Looking over my own code, I'm pretty sure I know what's the problem. But before we get fixing, change your render IDs: int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID(ARMOR_URANIUM.name()); int copperRenderID = SeroCraft.proxy.registerArmorRenderID(ARMOR_COPPER.name()); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID(UNOBTANIUM.name()); You have to change them again because RenderingRegistry.addNewArmourRendererPrefix (which is in your client proxy) adds an armor prefix to the string array RenderBiped.bipedArmorFilenamePrefix . bipedArmorFilenamePrefix is defined as an array of armor type strings ( new String[] {"leather", "chainmail", "iron", "diamond", "gold"} ), so your code should register armor type strings, rather than texture paths, when using SeroCraft.proxy.registerArmorRenderID . Now getting to the actual fixing, change public String getArmorTextureFile(ItemStack itemstack, Entity entity, int slot, int layer) to public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, int layer) . This is in the armor class (e.g. ItemSCUnobtaniumArmor). Before you even think about modding, please learn basic Java.
January 13, 201411 yr Author Looking over my own code, I'm pretty sure I know what's the problem. But before we get fixing, change your render IDs: int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID(ARMOR_URANIUM.name()); int copperRenderID = SeroCraft.proxy.registerArmorRenderID(ARMOR_COPPER.name()); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID(UNOBTANIUM.name()); You have to change them again because RenderingRegistry.addNewArmourRendererPrefix (which is in your client proxy) adds an armor prefix to the string array RenderBiped.bipedArmorFilenamePrefix . bipedArmorFilenamePrefix is defined as an array of armor type strings ( new String[] {"leather", "chainmail", "iron", "diamond", "gold"} ), so your code should register armor type strings, rather than texture paths, when using SeroCraft.proxy.registerArmorRenderID . Now getting to the actual fixing, change public String getArmorTextureFile(ItemStack itemstack, Entity entity, int slot, int layer) to public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, int layer) . This is in the armor class (e.g. ItemSCUnobtaniumArmor). That fixed everything. Thanks... Developer of Primeval Forest.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.