Créer un item simple
-
Le nom de ta classe c’est Modzoic donc il faut que tu mettes Modzoic.meatEpanterias (en pensant à bien importer).
Et je précise les seuls endroits où tu auras besoin de ça : “public class” ça sera au début de tes classes et uniquement là. -
Merci beaucoup à toi :D. Tout est bon, j’avais juste pas importé et sauvegardé.
"Appliquer le fichier JSON :
Dans un premier temps voici le fichier JSON de cet item (tutoriel), c’est le fichier JSON de base pour les items basiques de Minecraft".
Je le trouve où?
Et j’ai essayé de démarrer le jeu pour voir ça me met ça:
-
J’ai l’impression que ton message est pas complet.(la pj s’était mal chargée)
Pour trouver le fichier json, son contenu est juste en dessous de la phrase que tu as copié collé, je vois pas ce qui bloque…
Et pour le message, d’erreur ton projet dois etre mal configuré… Refais le gradlew eclipse et si ça marche toujours pas, je pense que quelqu’un d’autre t’aidera mieux que moi
-
{ "parent": "builtin/generated", "textures": { "layer0": "modid:items/itemTutoriel" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } }–—
^
|
ça je le trouve où dans eclipse?Et “Refais le gradlew eclipse”, c’est à dire? Je dois faire quoi exactement :/?
-
Ah oui effectivement, il y a pas marqué dans le tuto où il faut mettre le json, il faut que t’ailles dans src/main/ressources/assets/tonmodid/models/item (créée les dossiers qu’il faut) et que tu y enregistres un fichier “LeNomDeLitem.json” où tu mets le contenu qu’il y a dans le tuto.
Pour le gradlew eclipse, si t’a suivi le tuto “Installer et configurer l’espace de travail Forge”, tu devrais savoir ce que c’est.
-
C’est tout bon. Pour gradlew eclipse je vais voir. Je m’en rappelle plus bien.
J’ai tenté de redémarrer le jeu, ça à lancer le luncher et avant que ça marche (5/7), ça a crash et a marqué Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.Using VBOs: No
Is Modded: Definitely; Client brand changed to ‘fml,forge’
Type: Client (map_client.txt)
Resource Packs:
Current Language: Français (France)
Profiler Position: N/A (disabled)
CPU: 2x Intel
Pentium
CPU 2020M @ 2.40GHz
[16:06:15] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:612]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Conqueror\Documents\Modding\forge-1.8.8\run.\crash-reports\crash-2016-03-28_16.06.15-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot
64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release -
Il faudrait plutôt un copier/coller de ce qui se trouve dans ce fichier : C:\Users\Conqueror\Documents\Modding\forge-1.8.8\run.\crash-reports\crash-2016-03-28_16.06.15-client.txt
-
–-- Minecraft Crash Report ---- // There are four lights! Time: 28/03/16 16:06 Description: Initializing game java.lang.NullPointerException: Initializing game at fr.minecraftforgefrance.modzoic.proxy.ClientProxy.registerRender(ClientProxy.java:15) at fr.minecraftforgefrance.modzoic.common.Modzoic.init(Modzoic.java:36) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:559) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:729) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:307) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) 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:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.minecraftforgefrance.modzoic.proxy.ClientProxy.registerRender(ClientProxy.java:15) at fr.minecraftforgefrance.modzoic.common.Modzoic.init(Modzoic.java:36) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:559) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:729) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:307) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) 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:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.8.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_77, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 820643296 bytes (782 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.18 Powered by Forge 11.15.0.1655 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHI mcp{9.18} [Minecraft Coder Pack] (minecraft.jar) UCHI FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.8-11.15.0.1655.jar) UCHI Forge{11.15.0.1655} [Minecraft Forge] (forgeSrc-1.8.8-11.15.0.1655.jar) UCHE modzoic{1.0.0} [Modzoic] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.3308' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.8.8 LWJGL: 2.9.4 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.3308, Intel GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: Français (France) Profiler Position: N/A (disabled) CPU: 2x Intel(R) Pentium(R) CPU 2020M @ 2.40GHz -
Inutile de m’envoyer ça par mp. Et mets la balise code à l’avenir pour les copier/coller de rapport de crash.
Tu as quoi à la ligne 15 de ton client proxy ? -
@‘robin4002’:
Inutile de m’envoyer ça par mp. Et mets la balise code à l’avenir pour les copier/coller de rapport de crash.
Tu as quoi à la ligne 15 de ton client proxy ?registerMesher.getItemModelMesher().register(Modzoic.meatEpanterias, 0, new ModelResourceLocation(“modid” + “:MeatEpanterias”, “inventory”));
Balise de code?
-
Tu enregistres le ModelMesher avant que l’item soit initialisé, c’est surement ça la cause du crash.
Tu peux envoyer ta classe principale ?La balise de code c’est celle en rouge :
Tu peux aussi l’entrer manuellement avec :ton copier/coller ici[/ code]
sans l'espace entre / et code Il y a aussi la balise java qui s'utilise de la même façon (en vert sur mon image) pour le code java. -
Ma classe principal c’est “modzoic” je crois.
–-- Minecraft Crash Report ---- // My bad. Time: 28/03/16 16:53 Description: Initializing game java.lang.NullPointerException: Initializing game at fr.minecraftforgefrance.modzoic.proxy.ClientProxy.registerRender(ClientProxy.java:15) at fr.minecraftforgefrance.modzoic.common.Modzoic.init(Modzoic.java:36) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:559) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:729) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:307) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) 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:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at fr.minecraftforgefrance.modzoic.proxy.ClientProxy.registerRender(ClientProxy.java:15) at fr.minecraftforgefrance.modzoic.common.Modzoic.init(Modzoic.java:36) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:559) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:729) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:307) at net.minecraft.client.Minecraft.startGame(Minecraft.java:532) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:360) at net.minecraft.client.main.Main.main(Main.java:116) 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:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.8.8 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_77, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 846585352 bytes (807 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.18 Powered by Forge 11.15.0.1655 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHI mcp{9.18} [Minecraft Coder Pack] (minecraft.jar) UCHI FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.8-11.15.0.1655.jar) UCHI Forge{11.15.0.1655} [Minecraft Forge] (forgeSrc-1.8.8-11.15.0.1655.jar) UCHE modzoic{1.0.0} [Modzoic] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.3308' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.8.8 LWJGL: 2.9.4 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.3308, Intel GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: Français (France) Profiler Position: N/A (disabled) CPU: 2x Intel(R) Pentium(R) CPU 2020M @ 2.40GHz -
Oui c’est Modzoic, il me faudrait le code de cette dernière.
-
Quel code?
Tiens si ça peut t’aider (classe principale, du nom de Modzoic.java):package fr.minecraftforgefrance.modzoic.common; import fr.minecraftforgefrance.modzoic.proxy.CommonProxy; import net.minecraft.item.Item; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = "modzoic", name = "Modzoic", version = "1.0.0") public class Modzoic { @Instance("modzoic") public static Modzoic instance; @SidedProxy(clientSide = "fr.minecraftforgefrance.modzoic.proxy.ClientProxy", serverSide = "fr.minecraftforgefrance.modzoic.proxy.CommonProxy") public static CommonProxy proxy; public static Item meatEpanterias; @EventHandler public void preInit(FMLPreInitializationEvent event) { meatEpanterias = new MeatEpanterias(); GameRegistry.registerItem(meatEpanterias, "MeatEpanterias"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } } -
Ton proxy est bien appelé après avoir init l’item, envoie ton proxy en entier (avec balise java (la tasse) svp), ça doit être registerMesher qui est null
-
client
package fr.minecraftforgefrance.modzoic.proxy; import fr.minecraftforgefrance.modzoic.common.MeatEpanterias; import fr.minecraftforgefrance.modzoic.common.Modzoic; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.client.renderer.entity.RenderItem; public class ClientProxy extends CommonProxy { RenderItem registerMesher = Minecraft.getMinecraft().getRenderItem(); @Override public void registerRender() { registerMesher.getItemModelMesher().register(Modzoic.meatEpanterias, 0, new ModelResourceLocation("modid" + ":MeatEpanterias", "inventory")); } }common
package fr.minecraftforgefrance.modzoic.proxy; public class CommonProxy { public void registerRender() { } } -
Mets la ligne RenderItem registerMesher = …
à l’intérieur de la fonction registerRender -
Comme ça?
Cela me met pleins de croix rouges. -
Whaaaaatttt, non pas entre les () mais entre les {}, ce qu’il y a entre les () c’est les paramètres, pas le fonction en elle même
-
À l’intérieur de la fonction c’est entre les accolades. Entre les parenthèse ce sont les arguments.
Je te conseil de lire le tutoriel ou regarder la vidéo sur la base de java.