Résolu Problème layer armure
-
Bonjour,
je passe mon mod de la 1.7 à la 1.12. Je suis entrain de m’occuper des layers des armures, mais elle ne s’affiche pas. J’ai cherché sur le forum, j’ai fait correctement les imports, les noms des textures sont bien en minuscule et le code n’a pas d’erreur. Chose bizzare quand je regarde les logs j’ai une erreur comme quoi il ne trouve pas les textures qui d’ailleurs ne sont pas les mêmes que j’ai renseigné. Je vous donne les codes et les logs ci-dessous:
package fr.gloria.glore.items.armor; import fr.gloria.glore.References; import fr.gloria.glore.init.ItemsMod; import net.minecraft.entity.Entity; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ArmorMod extends ItemArmor { public ArmorMod(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) { super(materialIn, renderIndexIn, equipmentSlotIn); setUnlocalizedName(name); setRegistryName(name); } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(slot == 2) { return References.MODID + ":" + "textures/models/armor/armor_mod_layer_2.png"; } else { return References.MODID + ":" + "textures/models/armor/armor_mod_layer_1.png"; } } }
Et les logs:
[15:04:23] [main/INFO]: Setting user: Player927 [15:04:26] [main/WARN]: Skipping bad option: lastServer: [15:04:26] [main/INFO]: LWJGL Version: 2.9.4 [15:04:30] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Glore [15:04:33] [Sound Library Loader/INFO]: Starting up SoundSystem... [15:04:34] [Thread-5/INFO]: Initializing LWJGL OpenAL [15:04:34] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [15:04:34] [Thread-5/INFO]: OpenAL initialized. [15:04:34] [Sound Library Loader/INFO]: Sound engine started [15:04:39] [main/INFO]: Created: 512x512 textures-atlas [15:04:41] [main/WARN]: Skipping bad option: lastServer: [15:04:41] [main/INFO]: Narrator library for x64 successfully loaded [15:04:42] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [15:04:49] [Server thread/INFO]: Starting integrated minecraft server version 1.12 [15:04:49] [Server thread/INFO]: Generating keypair [15:04:50] [Server thread/INFO]: Loaded 488 advancements [15:04:50] [Server thread/INFO]: Preparing start region for level 0 [15:04:51] [Server thread/INFO]: Preparing spawn area: 89% [15:04:51] [Server thread/INFO]: Changing view distance to 12, from 10 [15:04:53] [Server thread/INFO]: Player927[local:E:fdff057f] logged in with entity id 410 at (-230.15159974408138, 68.0, 263.26242301769116) [15:04:53] [Server thread/INFO]: Player927 joined the game [15:04:53] [Server thread/INFO]: Saving and pausing game... [15:04:53] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [15:04:54] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [15:04:54] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [15:04:57] [main/WARN]: Failed to load texture: glore:textures/models/armor/armormod_layer_1.png java.io.FileNotFoundException: glore:textures/models/armor/armormod_layer_1.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:34) ~[SimpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:69) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:44) [TextureManager.class:?] at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:130) [Render.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.renderArmorLayer(LayerArmorBase.java:66) [LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.doRenderLayer(LayerArmorBase.java:39) [LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.RenderLivingBase.renderLayers(RenderLivingBase.java:459) [RenderLivingBase.class:?] at net.minecraft.client.renderer.entity.RenderLivingBase.doRender(RenderLivingBase.java:194) [RenderLivingBase.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:75) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:28) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:390) [RenderManager.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawEntityOnScreen(GuiInventory.java:153) [GuiInventory.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:848) [GuiContainerCreative.class:?] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) [GuiContainer.class:?] at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:59) [InventoryEffectRenderer.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:687) [GuiContainerCreative.class:?] at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:349) [ForgeHooksClient.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1168) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1192) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:436) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] 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_241] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [15:04:57] [main/WARN]: Failed to load texture: glore:textures/models/armor/armormod_layer_2.png java.io.FileNotFoundException: glore:textures/models/armor/armormod_layer_2.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:34) ~[SimpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:69) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:44) [TextureManager.class:?] at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:130) [Render.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.renderArmorLayer(LayerArmorBase.java:66) [LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.layers.LayerArmorBase.doRenderLayer(LayerArmorBase.java:40) [LayerArmorBase.class:?] at net.minecraft.client.renderer.entity.RenderLivingBase.renderLayers(RenderLivingBase.java:459) [RenderLivingBase.class:?] at net.minecraft.client.renderer.entity.RenderLivingBase.doRender(RenderLivingBase.java:194) [RenderLivingBase.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:75) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:28) [RenderPlayer.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:390) [RenderManager.class:?] at net.minecraft.client.gui.inventory.GuiInventory.drawEntityOnScreen(GuiInventory.java:153) [GuiInventory.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:848) [GuiContainerCreative.class:?] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) [GuiContainer.class:?] at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:59) [InventoryEffectRenderer.class:?] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:687) [GuiContainerCreative.class:?] at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:349) [ForgeHooksClient.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1168) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1192) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:436) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] 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_241] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [15:05:05] [Server thread/INFO]: Saving and pausing game... [15:05:05] [Server thread/INFO]: Saving chunks for level 'New World'/overworld [15:05:05] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether [15:05:05] [Server thread/INFO]: Saving chunks for level 'New World'/the_end [15:05:05] [Server thread/INFO]: Stopping server [15:05:05] [Server thread/INFO]: Saving players
Merci de votre aide
-