Posted August 24, 20169 yr Hello there, i've got a problem with my mod. I created some armor and it's working, but the armor isn't visible on the player. So wehen i wear the armor, it won't be visible and the item in my hand isn't visible too. :'( Please try to help me! There's my code and the Error: @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(slot == 0 || slot == 1 || slot == 3) { return ALLinONEmod.MODID + ":textures/models/armor/ruby_layer_1.png"; } else if(slot == 2) { return ALLinONEmod.MODID + ":textures/models/armor/ruby_layer_2.png"; } else { return null; } } [14:11:11] [Client thread/ERROR]: Couldn't render entity java.lang.NullPointerException at net.minecraft.client.renderer.entity.layers.LayerArmorBase.getArmorResource(LayerArmorBase.java:179) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.func_177182_a(LayerArmorBase.java:62) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.doRenderLayer(LayerArmorBase.java:38) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.RendererLivingEntity.func_177093_a(RendererLivingEntity.java:480) ~[RendererLivingEntity.class:?] at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:190) [RendererLivingEntity.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.func_180596_a(RenderPlayer.java:71) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:275) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:381) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:361) [RenderManager.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawEntityOnScreen(GuiInventory.java:123) [GuiInventory.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawGuiContainerBackgroundLayer(GuiInventory.java:92) [GuiInventory.class:?] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:95) [GuiContainer.class:?] at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:53) [inventoryEffectRenderer.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawScreen(GuiInventory.java:77) [GuiInventory.class:?] at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:470) [ForgeHooksClient.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1114) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] MY MODS ARE AWESOME!!! ...and sometimes they won't work Contact me in skype for live chat: Affenkind
August 24, 20169 yr Author Why should I use 1.10? I think 1.8 is better! Armor: public static Item ruby_helmet; public static Item ruby_chestplate; public static Item ruby_leggins; public static Item ruby_boots; PreInit: ruby_helmet = new ItemRubyArmor(RUBY_ARMOR, 0, 0); ruby_chestplate = new ItemRubyArmor(RUBY_ARMOR, 0, 1); ruby_leggins = new ItemRubyArmor(RUBY_ARMOR, 0, 2); ruby_boots = new ItemRubyArmor(RUBY_ARMOR, 0, 3); Init: GameRegistry.registerItem(ruby_helmet, "ruby_helmet"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ruby_helmet, 0, new ModelResourceLocation (ALLinONEmod.MODID + ":ruby_helmet", "inventory")); GameRegistry.registerItem(ruby_chestplate, "ruby_chestplate"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ruby_chestplate, 0, new ModelResourceLocation (ALLinONEmod.MODID + ":ruby_chestplate", "inventory")); GameRegistry.registerItem(ruby_leggins, "ruby_leggins"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ruby_leggins, 0, new ModelResourceLocation (ALLinONEmod.MODID + ":ruby_leggins", "inventory")); GameRegistry.registerItem(ruby_boots, "ruby_boots"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ruby_boots, 0, new ModelResourceLocation (ALLinONEmod.MODID + ":ruby_boots", "inventory")); The armor material is right here: public static ArmorMaterial RUBY_ARMOR; PreInit: RUBY_ARMOR = EnumHelper.addArmorMaterial("ruby_armor", null, 20, new int[]{2, 7, 6, 3}, 9); MY MODS ARE AWESOME!!! ...and sometimes they won't work Contact me in skype for live chat: Affenkind
August 24, 20169 yr Author Thank you! My problem is solved. 1.8 is better for me because there is a better fighting system. You may think the 1.9 system is better but that's not important. I can choose what version i am modding! ;-) MY MODS ARE AWESOME!!! ...and sometimes they won't work Contact me in skype for live chat: Affenkind
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.