Créer une armure
-
Me revoilà avec mes déboires de débutante qui galère.
J’ai suivi le tuto à la lettre, Eclipse ne me signale aucune erreur, pourtant, quand je lance le jeu, la texture de mon armure sur le joueur de s’affiche pas…
La texture est au bon endroit, dans le bon dossier, avec le bon nom, pas de problème de majuscule/minuscule… bref, je cherche depuis des heures et je ne vois pas le problème, donc si quelqu’un a une idée, je suis preneuse!
Voici le code de la classe de mon armure:
package fr.misschey.westworld.items; import fr.misschey.westworld.WestWorld; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemArmor; import net.minecraftforge.common.util.EnumHelper; public class CowboyArmor extends ItemArmor { public static final ArmorMaterial material = EnumHelper.addArmorMaterial("cowboy", WestWorld.MODID + ":cowboy", 500, new int[]{3, 6, 8, 3}, 25, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F); public CowboyArmor(EntityEquipmentSlot equipmentSlotIn) { super(material, 0, equipmentSlotIn); } }Edit: Je suis en 1.11.2
-
Est-ce qu’il y a des erreurs dans les logs ?
-
Voilà ce qui s’affiche dans la console quand je lance le jeu:
2017-03-29 20:05:52,634 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-03-29 20:05:52,636 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [20:05:52] [main/INFO] [GradleStart]: Extra: [] [20:05:52] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Fujitsu/.gradle/caches/minecraft/assets, --assetIndex, 1.11, --accessToken{REDACTED}, --version, 1.11.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [20:05:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [20:05:52] [main/INFO] [FML]: Forge Mod Loader version 13.20.0.2260 for Minecraft 1.11.2 loading [20:05:52] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_121, running on Windows 10:x86:10.0, installed at C:\Program Files (x86)\Java\jre1.8.0_121 [20:05:52] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [20:05:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [20:05:52] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [20:05:52] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [20:05:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:05:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [20:05:53] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [20:05:55] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [20:05:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [20:05:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [20:05:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [20:05:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [20:05:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [20:05:55] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2017-03-29 20:05:56,348 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-03-29 20:05:56,405 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2017-03-29 20:05:56,407 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [20:05:56] [Client thread/INFO]: Setting user: Player171 [20:06:01] [Client thread/WARN]: Skipping bad option: lastServer: [20:06:01] [Client thread/INFO]: LWJGL Version: 2.9.4 [20:06:03] [Client thread/INFO]: [STDOUT]: –-- Minecraft Crash Report ---- // You're mean. Time: 3/29/17 8:06 PM Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.11.2 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_121, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 940043968 bytes (896 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 9300M GS/PCIe/SSE2' [20:06:03] [Client thread/INFO] [FML]: MinecraftForge v13.20.0.2260 Initialized [20:06:03] [Client thread/INFO] [FML]: Replaced 232 ore recipes [20:06:03] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [20:06:03] [Client thread/INFO] [FML]: Searching C:\Users\Fujitsu\Desktop\Forge1.11\run\mods for mods [20:06:05] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [20:06:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, westworld] at CLIENT [20:06:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, westworld] at SERVER [20:06:05] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:WestWorld [20:06:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [20:06:06] [Client thread/INFO] [FML]: Found 444 ObjectHolder annotations [20:06:06] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [20:06:06] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [20:06:06] [Client thread/INFO] [FML]: Applying holder lookups [20:06:06] [Client thread/INFO] [FML]: Holder lookups applied [20:06:06] [Client thread/INFO] [FML]: Applying holder lookups [20:06:06] [Client thread/INFO] [FML]: Holder lookups applied [20:06:06] [Client thread/INFO] [FML]: Applying holder lookups [20:06:06] [Client thread/INFO] [FML]: Holder lookups applied [20:06:06] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [20:06:06] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [20:06:06] [Client thread/INFO] [FML]: Applying holder lookups [20:06:06] [Client thread/INFO] [FML]: Holder lookups applied [20:06:06] [Client thread/INFO] [FML]: Injecting itemstacks [20:06:06] [Client thread/INFO] [FML]: Itemstack injection complete [20:06:06] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: AHEAD Target: null [20:06:21] [Sound Library Loader/INFO]: Starting up SoundSystem… [20:06:21] [Thread-8/INFO]: Initializing LWJGL OpenAL [20:06:21] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [20:06:22] [Thread-8/INFO]: OpenAL initialized. [20:06:22] [Sound Library Loader/INFO]: Sound engine started [20:06:27] [Client thread/INFO] [FML]: Max texture size: 8192 [20:06:27] [Client thread/INFO]: Created: 16x16 textures-atlas [20:06:28] [Client thread/INFO] [FML]: Injecting itemstacks [20:06:28] [Client thread/INFO] [FML]: Itemstack injection complete [20:06:28] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [20:06:28] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:WestWorld [20:06:32] [Client thread/INFO]: SoundSystem shutting down… [20:06:32] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [20:06:32] [Sound Library Loader/INFO]: Starting up SoundSystem… [20:06:32] [Thread-10/INFO]: Initializing LWJGL OpenAL [20:06:32] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [20:06:32] [Thread-10/INFO]: OpenAL initialized. [20:06:33] [Sound Library Loader/INFO]: Sound engine started [20:06:37] [Client thread/INFO] [FML]: Max texture size: 8192 [20:06:38] [Client thread/INFO]: Created: 512x512 textures-atlas [20:06:40] [Client thread/WARN]: Skipping bad option: lastServer: [20:06:42] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id -
Rien concernant la texture.
Étrange. Tu peux envoyer un screenshot de src/main/resources sur eclipse ? -
Quelque part, ça me rassure que ça soit pas un truc énorme et évident que j’aurai pas vu

Voilà:

-
assets.modid.textures.models.armor.lenom_layer_1.png et assets.modid.textures.models.armor.lenom_layer_2
Vérifie, tu t’es trompé
-
Ok, effectivement, je vois… finalement c’était bien un truc énorme et évident que j’avais pas vu… bon, désolée de vous avoir embêté pour rien, je vais corriger ça tout de suite, et merci pour votre patience

-
Bonjour malgré avoir suivi le tutoriel je n’arrive pas a avoir un rendu sur mes pièces d’armure dans mon inventaire j’ai essayer divers trucs sur les json sans résultats
Voici mes logsCaused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] … 20 more [15:34:22] [Client thread/ERROR] [FML]: Exception loading model for variant minecraft:copper_helmet#inventory for item "simpleores:copper_helmet", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model minecraft:item/copper_helmet with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:539) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:385) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] 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_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.io.FileNotFoundException: minecraft:models/item/copper_helmet.json 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.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] … 20 more [15:34:22] [Client thread/ERROR] [FML]: Exception loading model for variant minecraft:copper_helmet#inventory for item "simpleores:copper_helmet", blockstate location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model minecraft:copper_helmet#inventory with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:539) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:385) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] 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_131] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] … 20 more -
Tu dois oublier de préciser ton mod ID lorsque tu indiques ton ModelResourceLocation
-
Je viens de faire ce que tu m’as demandé et miracle ça fonctionne ! Merci beaucoup pour ton aide et ta patience !