Une armure
-
Il faut mettre le bon modid …
Au pire ne les mets pas, c’est optionnel, les items fonctionnent sans être enregistré.
Fanor79 :
@‘robin4002’:
le premier 0 n’a aucun intérêt pour nous, il n’est que utilisé pour les amures de Minecraft, dans notre cas il sert juste à éviter une erreur dans le constructeur que nous allons créer après dans la classe de l’armure. Laissez 0, si vous mettez un nombre supérieur à 4 vous allez avoir un crash.
Maintenant je peux ajouter : “et si ça crash pas la texture sur le joueur ne fonctionnera pas”
-
Ok je reregarderais les ID
-
Ok Merci ca marche :D___
J’avais pas vu le petit message :3___
Mais du cout le soucis c’est que ca a l’armure en cuir de base :3 -
J’ai rien dit ca marche :3
-
Salut a tous , pour ma part je cherche a mettre des effets sur une armure, j ai beau chercher dans le code existant de l armure, chercher dans les effets des potions ou des enchantements etc… je ne trouve toujours pas. quelqu un aurai t il un tuyau ? sinon je pense que ca pourrait etre un bon complement a ce tuto sur les armures.
-
J’utilise ça:
@Override public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack stack) { if(!stack.isItemEnchanted()) { stack.addEnchantment(Enchantment.thorns, 10); } player.addPotionEffect(new PotionEffect(Potion.hunger.id, 20, 100)); }
Après a toi de voir ce que tu veux y mettre.
-
Je vais tester ca immediatement. merci pour ton aide
EDIT: Apres un premier test, resultat super concluant
Encore Merci. -
bonjour serai t’il possible d’avoir le code pour crée juste un casque ?
-
Dans la classe principale, tu déclare juste le casque.
Dans la classe de l’armure, tu mets ça :public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { return "modtutoriel:textures/models/armor/tutorial_layer_1.png"; }
-
Bonjour, j’ai suivi ton tuto mais après avoir créé l’armure et les items, Minecraft crash :
oct. 05, 2013 11:48:14 AM net.minecraft.launchwrapper.LogWrapper log INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker 2013-10-05 11:48:14 [INFO] [ForgeModLoader] Forge Mod Loader version 6.2.62.871 for Minecraft 1.6.2 loading 2013-10-05 11:48:14 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) Client VM, version 1.7.0_25, running on Windows Vista:x86:6.0, installed at C:\Program Files\Java\jre7 2013-10-05 11:48:14 [INFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2013-10-05 11:48:14 [INFO] [STDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg 2013-10-05 11:48:14 [INFO] [STDOUT] Loaded 107 rules from AccessTransformer config file forge_at.cfg 2013-10-05 11:48:15 [SEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work! 2013-10-05 11:48:16 [INFO] [ForgeModLoader] Launching wrapped minecraft 2013-10-05 11:48:17 [INFO] [Minecraft-Client] Setting user: Player991 2013-10-05 11:48:17 [INFO] [Minecraft-Client] (Session ID is null) 2013-10-05 11:48:19 [INFO] [Minecraft-Client] LWJGL Version: 2.9.0 2013-10-05 11:48:20 [INFO] [Minecraft-Client] Reloading ResourceManager: Default 2013-10-05 11:48:22 [INFO] [STDOUT] 2013-10-05 11:48:22 [INFO] [STDOUT] Starting up SoundSystem… 2013-10-05 11:48:22 [INFO] [STDOUT] Initializing LWJGL OpenAL 2013-10-05 11:48:22 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-10-05 11:48:22 [INFO] [MinecraftForge] Attempting early MinecraftForge initialization 2013-10-05 11:48:22 [INFO] [STDOUT] MinecraftForge v9.10.1.871 Initialized 2013-10-05 11:48:22 [INFO] [ForgeModLoader] MinecraftForge v9.10.1.871 Initialized 2013-10-05 11:48:22 [INFO] [STDOUT] OpenAL initialized. 2013-10-05 11:48:22 [INFO] [STDOUT] Replaced 101 ore recipies 2013-10-05 11:48:22 [INFO] [MinecraftForge] Completed early MinecraftForge initialization 2013-10-05 11:48:22 [INFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Thierry\Documents\ROMAIN\NewMods1.6.2&+\1.6.2\Forge\Money\forge\mcp\jars\config\logging.properties 2013-10-05 11:48:22 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2013-10-05 11:48:22 [INFO] [STDOUT] 2013-10-05 11:48:22 [INFO] [ForgeModLoader] Searching C:\Users\Thierry\Documents\ROMAIN\NewMods1.6.2&+\1.6.2\Forge\Money\forge\mcp\jars\mods for mods 2013-10-05 11:48:26 [INFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load 2013-10-05 11:48:26 [INFO] [mcp] Activating mod mcp 2013-10-05 11:48:26 [INFO] [FML] Activating mod FML 2013-10-05 11:48:26 [INFO] [Forge] Activating mod Forge 2013-10-05 11:48:26 [INFO] [ModMoHumans2] Activating mod ModMoHumans2 2013-10-05 11:48:26 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well 2013-10-05 11:48:26 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well 2013-10-05 11:48:26 [WARNING] [Mo'Humans 2] Mod Mo'Humans 2 is missing a pack.mcmeta file, things may not work well 2013-10-05 11:48:26 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mo'Humans 2 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] SoundSystem shutting down… 2013-10-05 11:48:27 [INFO] [STDOUT] Author: Paul Lamb, www.paulscode.com 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] Starting up SoundSystem… 2013-10-05 11:48:27 [INFO] [ForgeModLoader] Registering Forge Packet Handler 2013-10-05 11:48:27 [INFO] [ForgeModLoader] Succeeded registering Forge Packet Handler 2013-10-05 11:48:27 [INFO] [STDOUT] Initializing LWJGL OpenAL 2013-10-05 11:48:27 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-10-05 11:48:27 [INFO] [STDOUT] OpenAL initialized. 2013-10-05 11:48:27 [INFO] [ForgeModLoader] Configured a dormant chunk cache size of 0 2013-10-05 11:48:27 [SEVERE] [ForgeModLoader] Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue 2013-10-05 11:48:27 [SEVERE] [ForgeModLoader] mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{6.2.62.871} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized Forge{9.10.1.871} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized ModMoHumans2{1.0.0} [Mo'Humans 2] (bin) Unloaded->Constructed->Errored 2013-10-05 11:48:27 [SEVERE] [ForgeModLoader] The following problems were captured during this phase 2013-10-05 11:48:27 [SEVERE] [ForgeModLoader] Caught exception from ModMoHumans2 java.lang.NullPointerException at cpw.mods.fml.common.registry.ItemData.setName(ItemData.java:158) at cpw.mods.fml.common.registry.GameData.setName(GameData.java:256) at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:151) at fr.MrBlockTNT.MoHumans.ModMoHumans.PreInit(ModMoHumans.java:45) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105) at cpw.mods.fml.common.Loader.loadMods(Loader.java:520) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:181) at net.minecraft.client.Minecraft.startGame(Minecraft.java:471) at net.minecraft.client.Minecraft.run(Minecraft.java:806) 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:57) at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-10-05 11:48:27 [INFO] [STDOUT] –-- Minecraft Crash Report ---- 2013-10-05 11:48:27 [INFO] [STDOUT] // You should try our sister game, Minceraft! 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] Time: 05/10/13 11:48 2013-10-05 11:48:27 [INFO] [STDOUT] Description: Initializing game 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] java.lang.NullPointerException 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.ItemData.setName(ItemData.java:158) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.GameData.setName(GameData.java:256) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:151) 2013-10-05 11:48:27 [INFO] [STDOUT] at fr.MrBlockTNT.MoHumans.ModMoHumans.PreInit(ModMoHumans.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.Loader.loadMods(Loader.java:520) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:181) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.Minecraft.startGame(Minecraft.java:471) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:806) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] A detailed walkthrough of the error, its code path and all known details is as follows: 2013-10-05 11:48:27 [INFO] [STDOUT] –------------------------------------------------------------------------------------- 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] – Head -- 2013-10-05 11:48:27 [INFO] [STDOUT] Stacktrace: 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.ItemData.setName(ItemData.java:158) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.GameData.setName(GameData.java:256) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:151) 2013-10-05 11:48:27 [INFO] [STDOUT] at fr.MrBlockTNT.MoHumans.ModMoHumans.PreInit(ModMoHumans.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-10-05 11:48:27 [INFO] [STDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.common.Loader.loadMods(Loader.java:520) 2013-10-05 11:48:27 [INFO] [STDOUT] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:181) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.Minecraft.startGame(Minecraft.java:471) 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] – Initialization -- 2013-10-05 11:48:27 [INFO] [STDOUT] Details: 2013-10-05 11:48:27 [INFO] [STDOUT] Stacktrace: 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:806) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) 2013-10-05 11:48:27 [INFO] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:18) 2013-10-05 11:48:27 [INFO] [STDOUT] 2013-10-05 11:48:27 [INFO] [STDOUT] – System Details -- 2013-10-05 11:48:27 [INFO] [STDOUT] Details: 2013-10-05 11:48:27 [INFO] [STDOUT] Minecraft Version: 1.6.2 2013-10-05 11:48:27 [INFO] [STDOUT] Operating System: Windows Vista (x86) version 6.0 2013-10-05 11:48:27 [INFO] [STDOUT] Java Version: 1.7.0_25, Oracle Corporation 2013-10-05 11:48:27 [INFO] [STDOUT] Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation 2013-10-05 11:48:27 [INFO] [STDOUT] Memory: 945325464 bytes (901 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) 2013-10-05 11:48:27 [INFO] [STDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 2013-10-05 11:48:27 [INFO] [STDOUT] AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used 2013-10-05 11:48:27 [INFO] [STDOUT] Suspicious classes: FML and Forge are installed 2013-10-05 11:48:27 [INFO] [STDOUT] IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 2013-10-05 11:48:27 [INFO] [STDOUT] FML: MCP v8.04 FML v6.2.62.871 Minecraft Forge 9.10.1.871 4 mods loaded, 4 mods active 2013-10-05 11:48:27 [INFO] [STDOUT] mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized 2013-10-05 11:48:27 [INFO] [STDOUT] FML{6.2.62.871} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized 2013-10-05 11:48:27 [INFO] [STDOUT] Forge{9.10.1.871} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized 2013-10-05 11:48:27 [INFO] [STDOUT] ModMoHumans2{1.0.0} [Mo'Humans 2] (bin) Unloaded->Constructed->Errored 2013-10-05 11:48:27 [INFO] [STDOUT] Launched Version: 1.6 2013-10-05 11:48:27 [INFO] [STDOUT] LWJGL: 2.9.0 2013-10-05 11:48:27 [INFO] [STDOUT] OpenGL: GeForce 9300 GE/PCIe/SSE2/3DNOW! GL version 3.3.0, NVIDIA Corporation 2013-10-05 11:48:27 [INFO] [STDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge' 2013-10-05 11:48:27 [INFO] [STDOUT] Type: Client (map_client.txt) 2013-10-05 11:48:27 [INFO] [STDOUT] Resource Pack: Default 2013-10-05 11:48:27 [INFO] [STDOUT] Current Language: English (US) 2013-10-05 11:48:27 [INFO] [STDOUT] Profiler Position: N/A (disabled) 2013-10-05 11:48:27 [INFO] [STDOUT] Vec3 Pool Size: ~~ERROR~~ NullPointerException: null 2013-10-05 11:48:27 [INFO] [STDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Vous ne le saurez pas \Documents\ça non plus\NewMods1.6.2&+\1.6.2\Forge\Mo'Humans2\forge\mcp\jars\.\crash-reports\crash-2013-10-05_11.48.27-client.txt AL lib: (EE) alc_cleanup: 1 device not closed
(Je l’ai mis en balises java parce que j’arrive pas à faire des balises de texte x) )
Voici mon code :
ModMoHumans :
package fr.MrBlockTNT.MoHumans; import net.minecraft.entity.EnumCreatureType; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import MrBlockTNT.Proxy.CommonProxy; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = "ModMoHumans2", name = "Mo'Humans 2", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ModMoHumans { @SidedProxy(clientSide = "MrBlockTNT.Proxy.ClientProxy", serverSide = "MrBlockTNT.Proxy.CommonProxy") public static CommonProxy proxy; @Instance("ModMoHumans2") public static ModMoHumans instance; public static Item AssassinHelmet, AssassinChestPlate, AssassinLeggings, AssassinBoots; static EnumArmorMaterial AssassinArmor = EnumHelper.addArmorMaterial("Wool", 5, new int[]{2, 4, 2, 1}, 15); @EventHandler public void PreInit(FMLPreInitializationEvent event) { AssassinHelmet = new ItemAssassinArmor(12002, AssassinArmor, 0,0).setUnlocalizedName("Assassin's Helmet").setTextureName("modmohumans2:armor/Assassin"); AssassinChestPlate = new ItemAssassinArmor(12003, AssassinArmor, 0, 1).setUnlocalizedName("Assassin's ChestPlate").setTextureName("modmohumans2:armor/Assassin1"); AssassinLeggings = new ItemAssassinArmor(12004, AssassinArmor, 0, 2).setUnlocalizedName("Assassin's Leggings").setTextureName("modmohumans2:armor/Assassin2"); AssassinBoots = new ItemAssassinArmor(12005, AssassinArmor, 0, 3).setUnlocalizedName("Assassin's Boots").setTextureName("modmohumans2:armor/Assassin3"); GameRegistry.registerItem(AssassinHelmet, "Assassin's Halmet", "Mo'Humans2"); GameRegistry.registerItem(AssassinChestPlate, "Assassin's ChestPlate", "Mo'Humans2"); GameRegistry.registerItem(AssassinLeggings, "Assassin's Leggings", "Mo'Humans2"); GameRegistry.registerItem(AssassinBoots, "Assassin's Boots", "Mo'Humans2"); } @EventHandler public void Init(FMLInitializationEvent event) { proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityMiner.class, "Miner", EntityRegistry.findGlobalUniqueEntityId(), 0x6A7372, 0x78807F); EntityRegistry.registerModEntity(EntityMiner.class, "Miner", 500, this, 40, 1, true); EntityRegistry.addSpawn(EntityMiner.class, 1, 1, 2, EnumCreatureType.ambient); LanguageRegistry.instance().addStringLocalization("entity.Miner.name", "Miner"); EntityRegistry.registerGlobalEntityID(EntityAssassin.class, "Assassin", EntityRegistry.findGlobalUniqueEntityId(), 0xF00000, 0x9E9292); EntityRegistry.registerModEntity(EntityAssassin.class, "Assassin", 501, this, 40, 1, true); EntityRegistry.addSpawn(EntityAssassin.class, 1, 1, 1, EnumCreatureType.monster); LanguageRegistry.instance().addStringLocalization("entity.Assassin.name", "Assassin"); EntityRegistry.registerGlobalEntityID(EntityKnight.class, "Knight", EntityRegistry.findGlobalUniqueEntityId(), 0x131514, 0xC6DCD9); EntityRegistry.registerModEntity(EntityKnight.class, "Knight", 502, this, 40, 1, true); EntityRegistry.addSpawn(EntityKnight.class, 1, 3, 1, EnumCreatureType.ambient); LanguageRegistry.instance().addStringLocalization("entity.Knight.name", "Knight"); EntityRegistry.registerGlobalEntityID(EntityWoodCuter.class, "WoodCuter", EntityRegistry.findGlobalUniqueEntityId(), 0x261801, 0x674306); EntityRegistry.registerModEntity(EntityWoodCuter.class, "WoodCuter", 503, this, 40, 1, true); EntityRegistry.addSpawn(EntityWoodCuter.class, 1, 1, 1, EnumCreatureType.ambient); LanguageRegistry.instance().addStringLocalization("entity.WoodCuter.name", "Woodcuter"); EntityRegistry.registerGlobalEntityID(EntityHunter.class, "Hunter", EntityRegistry.findGlobalUniqueEntityId(), 0x261811, 0xC7C3BC); EntityRegistry.registerModEntity(EntityHunter.class, "Hunter", 504, this, 40, 1, true); EntityRegistry.addSpawn(EntityHunter.class, 1, 1, 1, EnumCreatureType.ambient); LanguageRegistry.instance().addStringLocalization("entity.Hunter.name", "Hunter"); EntityRegistry.registerGlobalEntityID(EntityBarbarian.class, "Barbarian", EntityRegistry.findGlobalUniqueEntityId(), 0x231300, 0x000000); EntityRegistry.registerModEntity(EntityBarbarian.class, "Barbarian", 505, this, 40, 1, true); EntityRegistry.addSpawn(EntityBarbarian.class, 1, 1, 1, EnumCreatureType.monster); LanguageRegistry.instance().addStringLocalization("entity.Barbarian.name", "Barbarian"); EntityRegistry.registerGlobalEntityID(EntityPirate.class, "Pirate", EntityRegistry.findGlobalUniqueEntityId(), 0x0F19AF, 0xDB0000); EntityRegistry.registerModEntity(EntityPirate.class, "Pirate", 506, this, 40, 1, true); EntityRegistry.addSpawn(EntityPirate.class, 1, 1, 1, EnumCreatureType.monster); LanguageRegistry.instance().addStringLocalization("entity.Pirate.name", "Pirate"); EntityRegistry.registerGlobalEntityID(EntityHerobrine.class, "Herobrine", EntityRegistry.findGlobalUniqueEntityId(), 0x0F19AF, 0xDB0000); EntityRegistry.registerModEntity(EntityHerobrine.class, "Herobrine", 507, this, 40, 1, true); EntityRegistry.addSpawn(EntityHerobrine.class, 1, 1, 1, EnumCreatureType.monster); LanguageRegistry.instance().addStringLocalization("entity.Herobrine.name", "Herobrine"); MinecraftForge.EVENT_BUS.register(new LivingEvent()); } @EventHandler public void PostInit(FMLPostInitializationEvent event) { } }
ItemAssassinArmor :
package fr.MrBlockTNT.MoHumans; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ItemAssassinArmor extends ItemArmor { public ItemAssassinArmor(int id, EnumArmorMaterial armorMaterial, int type, int layer) { super(id, armorMaterial, type, layer); } public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { if(stack.itemID == ModMoHumans.AssassinLeggings.itemID) { return "modmohumans2:armor/assassinLayer_2.png"; } else if(stack.itemID == ModMoHumans.AssassinHelmet.itemID || stack.itemID == ModMoHumans.AssassinChestPlate.itemID || stack.itemID == ModMoHumans.AssassinBoots.itemID) { return "modmohumans2:armor/assassinLayer_1.png.png"; //armure 1, casque + plastron + bottes } else { return "modmohumans2:armor/assassinLayer_2.png"; //armure 2, casque + plastron + bottes } } public boolean getIsRepairable(ItemStack stack, ItemStack stack2) { return true; } }
Pouvez-vous m’aider ? :huh:
-
GameRegistry.registerItem(AssassinHelmet, "Assassin's Halmet", "Mo'Humans2"); GameRegistry.registerItem(AssassinChestPlate, "Assassin's ChestPlate", "Mo'Humans2"); GameRegistry.registerItem(AssassinLeggings, "Assassin's Leggings", "Mo'Humans2"); GameRegistry.registerItem(AssassinBoots, "Assassin's Boots", "Mo'Humans2");
->
GameRegistry.registerItem(AssassinHelmet, "Assassin's Halmet", "ModMoHumans2"); GameRegistry.registerItem(AssassinChestPlate, "Assassin's ChestPlate", "ModMoHumans2"); GameRegistry.registerItem(AssassinLeggings, "Assassin's Leggings", "ModMoHumans2"); GameRegistry.registerItem(AssassinBoots, "Assassin's Boots", "ModMoHumans2");
Il faut mettre le modid, et non le nom.
-
Ah ok merci ^^
-
J’ai un problème au niveau de la texture lorsque quelqu’un la porte. J’ai essayé plusieurs solutions, mais aucune ne fonctionne.
Mes 2 textures sont dans assets/modtutoriel/models/armor,
et voici le code chargeant les textures :if(stack.itemID == ModTutoriel.agandaurLeggings.itemID) { return "modtutoriel:textures/models/armor/tutorial_layer_2.png"; } else { return "modtutoriel:textures/models/armor/tutorial_layer_1.png";
Si quelqu’un a une réponse, merci
-
- Change les balises CODE par des balises JAVA [java][/java] sans les *
- Un screenshot de ton problème serais sympa.
-
@‘42.’:
Mes 2 textures sont dans assets/modtutoriel/models/armor
-> assets/modtutoriel/textures/models/armor
-
Voici le code correspondant
if(stack.itemID == ModTutoriel.agandaurLeggings.itemID) { return "modtutoriel:textures/models/armor/tutorial_layer_2.png"; } else { return "modtutoriel:textures/models/armor/tutorial_layer_1.png"; }
J’ai mis le screen en pièce jointe.
Autant pour moi, j’ai vérifié, le chemin est bien assets/modtutoriel/textures/models/armor contrairement à ce que j’avais indiqué lors de mon premier post.
Il charge la texture de l’armure de fer, par défaut j’ai l’impression, parce qu’il ne semble pas trouver la mienne mais pourquoi ?… -
Dans ce cas c’est pas un problème de texture non trouvé, je peux avoir ta classe principale + le constructeur de la classe ?
-
classe principale : désolé c’est un peu lourd. Je te mets que ce qui concerne l’armure ?
package tutoriel.common; import net.minecraft.block.BlockStoneBrick; import net.minecraft.block.BlockTorch; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemBow; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityDaylightDetector; import net.minecraft.util.DamageSource; import net.minecraftforge.common.EnumHelper; import com.jcraft.jorbis.Block; import tutoriel.block.*; import tutoriel.entity.TileEntityIthildin; import tutoriel.item.*; import tutoriel.proxy.TutoCommonProxy; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.TickType; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "ModTutoriel", name = "Mod Tutoriel", version = "1.0.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class ModTutoriel { @SidedProxy(clientSide = "tutoriel.proxy.TutoClientProxy", serverSide = "tutoriel.proxy.TutoCommonProxy") public static TutoCommonProxy proxy; @Instance("ModTutoriel") public static ModTutoriel instance; public static net.minecraft.block.Block rocheVerte; /** * Pierre taillée blanche, doré */ public static net.minecraft.block.Block whiteStoneBrick, stairsWhiteStoneBrick, slabWhiteStoneBrick, doubleSlabWhiteStoneBrick; public static net.minecraft.block.Block sandStoneBrick, stairsSandStoneBrick, slabSandStoneBrick, doubleSlabSandStoneBrick; /** * Roche magmatique */ public static net.minecraft.block.Block blockVolcanic; public static DamageSource volcanicBlock = new DamageSource("volcanicBlock"); /** * Ithildin */ public static net.minecraft.block.Block ithildin; public static net.minecraft.block.Block ithildinGlowing; /** * Boue */ public static net.minecraft.block.Block mud; /** * –------------------------------------------------------------------------------------------------- */ public static Item fireStick; public static LongBow longBow; public static Item longArrow; public static Item fireArrow; public static CrossBow crossBowUnloaded; public static CrossBowLoaded crossBowLoaded; public static Item dwarfAxe; public static Item chain; public static Item agandaurHelmet, agandaurChestPlate, agandaurLeggings, agandaurBoots; public static EnumArmorMaterial AgandaurArmor; public static Item urukSword; @EventHandler public void PreInit(FMLPreInitializationEvent event){ //Configuration //Blocks /** * Roche Verte */ rocheVerte = new GreenStone(2000).setHardness(1.0F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep) .setUnlocalizedName("RocheVerte").setTextureName("modtutoriel:roche_verte"); net.minecraft.block.Block.lightValue[2000]=14; GameRegistry.registerBlock(rocheVerte, "RocheVerte"); /** * Pierre taillée blanche */ whiteStoneBrick=new WhiteStoneBrick(2001).setHardness(1.5F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep) .setUnlocalizedName("PierreTailleBlanche").setTextureName("modtutoriel:pierre_taille_blanche"); GameRegistry.registerBlock(whiteStoneBrick, "WhiteStoneBrick"); /** * Escalier pierre taillée blanche */ stairsWhiteStoneBrick=new StairsWhiteStoneBrick(2002, whiteStoneBrick, 0).setUnlocalizedName("StairsWhiteStonebrick"); GameRegistry.registerBlock(stairsWhiteStoneBrick, "TutorialStairs"); /** * Dalle pierre taillée blanche */ doubleSlabWhiteStoneBrick = new SlabWhiteStoneBrick(2003, true).setHardness(2.0F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep).setUnlocalizedName("DoubleSlabWhiteStoneBrick"); slabWhiteStoneBrick = new SlabWhiteStoneBrick(2004, false).setHardness(2.0F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep).setUnlocalizedName("SlabWhiteStoneBrick"); GameRegistry.registerBlock(doubleSlabWhiteStoneBrick, ItemSlabWhiteStoneBrick.class, "DoubleSlabWhiteStoneBrick"); GameRegistry.registerBlock(slabWhiteStoneBrick, ItemSlabWhiteStoneBrick.class, "SlabWhiteStoneBrick"); /** * Pierre taillée sable */ sandStoneBrick=new WhiteStoneBrick(2005).setHardness(1.5F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep) .setUnlocalizedName("SandStoneBrick").setTextureName("modtutoriel:sand_stone_brick"); GameRegistry.registerBlock(sandStoneBrick, "SandStoneBrick"); /** * Escalier pierre taillée sable */ stairsSandStoneBrick=new StairsSandStoneBrick(2006, sandStoneBrick, 0).setUnlocalizedName("StairsSandStoneBrick"); GameRegistry.registerBlock(stairsSandStoneBrick, "StairsSandStoneBrick"); /** * Dalle pierre taillée blanche */ doubleSlabSandStoneBrick = new SlabSandStoneBrick(2007, true).setHardness(2.0F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep).setUnlocalizedName("DoubleSlabSandStoneBrick"); slabSandStoneBrick = new SlabSandStoneBrick(2008, false).setHardness(2.0F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep).setUnlocalizedName("SlabSandStoneBrick"); GameRegistry.registerBlock(doubleSlabSandStoneBrick, ItemSlabSandStoneBrick.class, "DoubleSlabSandStoneBrick"); GameRegistry.registerBlock(slabSandStoneBrick, ItemSlabSandStoneBrick.class, "SlabSandStoneBrick"); /** * Bloc volcanique */ blockVolcanic=new VolcanicBlock(2009).setHardness(1.5F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep).setUnlocalizedName("VolcanicBlock").setTextureName("modtutoriel:VolcanicBlock"); GameRegistry.registerBlock(blockVolcanic, "VolcanicBlock"); /** * Ithildin */ ithildin=new Ithildin(2010).setHardness(1.5F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep) .setUnlocalizedName("Ithildin").setTextureName("modtutoriel:ithildin"); GameRegistry.registerBlock(ithildin, "Ithildin"); ithildinGlowing=new Ithildin(2011).setHardness(1.5F).setResistance(10.0F).setStepSound(net.minecraft.block.Block.soundStoneFootstep) .setUnlocalizedName("IthildinGlowing").setLightValue(0.875F).setTextureName("modtutoriel:ithildinGlowing"); GameRegistry.registerBlock(ithildinGlowing, "IthildinGlowing"); TileEntity.addMapping(TileEntityIthildin.class, "IthildinTE"); /** * Boue */ mud=new Mud(2012).setHardness(0.5F).setHardness(0.5F).setStepSound(net.minecraft.block.Block.soundGravelFootstep).setUnlocalizedName("mud").setTextureName("modtutoriel:mud"); GameRegistry.registerBlock(mud,"Mud"); //Items fireStick = new FireStick(12000).setUnlocalizedName("FireStick").setTextureName("modtutoriel:fire_stick"); longBow = (LongBow)(new LongBow(12001)).setUnlocalizedName("long_bow").setTextureName("modtutoriel:long_bow"); longArrow = (new Item(12002)).setUnlocalizedName("LongArrow").setCreativeTab(CreativeTabs.tabCombat).setTextureName("modtutoriel:long_arrow"); fireArrow = (new Item(12003)).setUnlocalizedName("FireArrow").setCreativeTab(CreativeTabs.tabCombat).setTextureName("modtutoriel:firearrow"); crossBowUnloaded = (CrossBow) (new CrossBow(12004)).setUnlocalizedName("CrossBow").setTextureName("modtutoriel:cross_bow_unloaded"); crossBowLoaded = (CrossBowLoaded) (new CrossBowLoaded(12005)).setUnlocalizedName("CrossBowLoaded").setTextureName("modtutoriel:cross_bow_loaded"); dwarfAxe = (new DwarfAxe(12006, EnumToolMaterial.IRON)).setUnlocalizedName("DwarfAxe").setTextureName("modtutoriel:dwarf_axe1"); chain = new Item(12007).setUnlocalizedName("Chain").setTextureName("modtutoriel:chain").setMaxStackSize(64).setCreativeTab(CreativeTabs.tabMaterials); AgandaurArmor = EnumHelper.addArmorMaterial("Tutorial", 20, new int[]{4, 10, 7, 4}, 8); agandaurHelmet = new ItemAgandaurArmor(12008, AgandaurArmor, 0, 0).setUnlocalizedName("AgandaurHelmet").setTextureName("modtutoriel:agandaurHelmet"); agandaurChestPlate = new ItemAgandaurArmor(12009, AgandaurArmor, 0, 1).setUnlocalizedName("AgandaurChestPlate").setTextureName("modtutoriel:agandaurChestPlate"); agandaurLeggings = new ItemAgandaurArmor(12010, AgandaurArmor, 0, 2).setUnlocalizedName("AgandaurLeggings").setTextureName("modtutoriel:agandaurLeggings"); agandaurBoots = new ItemAgandaurArmor(12011, AgandaurArmor, 0, 3).setUnlocalizedName("AgandaurBoots").setTextureName("modtutoriel:agandaurBoots"); urukSword = new UrukSword(12012, EnumToolMaterial.IRON).setUnlocalizedName("UrukHaiSword").setTextureName("modtutoriel:uruk_sword"); //Achievements } @EventHandler public void Init(FMLInitializationEvent event){ //Registry //Mobs //Render proxy.registerRender(); //NetWork //Recipe GameRegistry.addRecipe(new ItemStack(sandStoneBrick, 8), new Object[]{"X", "Y", 'X', new ItemStack(net.minecraft.block.Block.stoneBrick,8), 'Y', net.minecraft.block.Block.sand}); GameRegistry.addRecipe(new ItemStack(slabWhiteStoneBrick ,6), new Object[]{"XXX", 'X' ,whiteStoneBrick}); GameRegistry.addRecipe(new ItemStack(stairsWhiteStoneBrick, 4), new Object[]{"X ", "XX ", "XXX", 'X',whiteStoneBrick}); GameRegistry.addRecipe(new ItemStack(whiteStoneBrick, 8), new Object[]{"XXX", "XYX", "XXX", 'X', net.minecraft.block.Block.stoneBrick, 'Y', new ItemStack(Item.dyePowder, 1, 15)}); GameRegistry.addRecipe(new ItemStack(Item.saddle), new Object[]{"YYY","X X",'X', Item.silk,'Y', Item.leather}); GameRegistry.addRecipe(new ItemStack(fireStick), new Object[]{" X"," Y ","Y ",'X', Item.coal,'Y', Item.stick}); GameRegistry.addRecipe(new ItemStack(mud, 8), new Object[]{"X", "Y", 'X', new ItemStack(net.minecraft.block.Block.dirt,8), 'Y', Item.bucketWater}); GameRegistry.addRecipe(new ItemStack(chain,8), new Object[]{" X ", "X X"," X ", 'X', net.minecraft.item.Item.ingotIron}); GameRegistry.addRecipe(new ItemStack(ItemArmor.helmetChain), new Object[]{"XXX","X X", 'X', chain}); GameRegistry.addRecipe(new ItemStack(ItemArmor.plateChain), new Object[]{"X X","XXX","XXX", 'X', chain}); GameRegistry.addRecipe(new ItemStack(ItemArmor.legsChain), new Object[]{"XXX","X X", "X X", 'X', chain}); GameRegistry.addRecipe(new ItemStack(ItemArmor.bootsChain), new Object[]{"X X","X X", 'X', chain}); } @EventHandler public void PostInit(FMLPostInitializationEvent event) { //Intégration avec les autres mods } }
et le constructeur
public ItemAgandaurArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); }
-
Or rapport, tu as une mauvaise importation dans ta classe principale :
import com.jcraft.jorbis.Block;
c’est pour ça que tu as du mettre public static net.minecraft.block.Block à la place de juste Block.Pour le problème de l’amure, je vois vraiment pas, tout les codes sembles bons, tu peux m’envoyer la classe de l’amure en entier ?
-
Merci pour cette correction
Je ne comprends pas vraiment non plus. À part un constructeur, et la méthode de génération des textures, je n’ai rien d’autre
J’ai fais plusieurs essais en modifiant le chemin des fichiers, et leur endroit, mais rien à faire….package tutoriel.item; import javax.swing.text.html.parser.Entity; import tutoriel.common.ModTutoriel; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ItemAgandaurArmor extends ItemArmor{ public ItemAgandaurArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); } public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { if(stack.itemID == ModTutoriel.agandaurLeggings.itemID) { return "modtutoriel:textures/models/armor/tutorial_layer_2.png"; } else { return "modtutoriel:models/armor/tutorial_layer_1.png"; } } }