Non résolu texture armor pour 1.8.9
-
Bonjour
J’ai crée une armure avec le tuto 1.7 qui marchait et qu’il marche mais quand je le porte il y a pas de texture et une erreur(pas un crash une erreur)[16:02:19] [Client thread/ERROR]: Couldn't render entity java.lang.NullPointerException at net.minecraft.client.renderer.entity.layers.LayerArmorBase.getArmorResource(LayerArmorBase.java:186) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.renderLayer(LayerArmorBase.java:61) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.doRenderLayer(LayerArmorBase.java:37) ~[LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.RendererLivingEntity.renderLayers(RendererLivingEntity.java:475) ~[RendererLivingEntity.class:?] at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:188) [RendererLivingEntity.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:70) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:23) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:380) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:360) [RenderManager.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawEntityOnScreen(GuiInventory.java:123) [GuiInventory.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:783) [GuiContainerCreative.class:?] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) [GuiContainer.class:?] at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:57) [InventoryEffectRenderer.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:626) [GuiContainerCreative.class:?] at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:310) [ForgeHooksClient.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1156) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:380) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:116) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_201] 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_201] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_201] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?]
le bout de code
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(slot == 2) { return MoDaichMod.MODID + ":textures/models/armor/tutorial_layer_2.png"; } return MoDaichMod.MODID + ":textures/models/armor/tutorial_layer_1.png"; }
Merci d’avance