Résolu Crash serveur
-
Bonjour bonsoir je voudrais savoir si quelqu’un saurais d’ou vient le probleme avec mon mod il ne crash que en multi :
Crash console :
[00:54:43] [Server thread/INFO]: Starting minecraft server version 1.7.10 [00:54:45] [Server thread/ERROR]: Encountered an unexpected exception cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/RenderGlobal at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559) ~[Loader.class:?] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) ~[FMLServerHandler.class:?] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314) ~[FMLCommonHandler.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117) ~[lt.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?] Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/RenderGlobal at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_92] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_92] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_92] at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_92] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:101) ~[EventBus.class:?] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:85) ~[EventBus.class:?] at Emox.Addon.preInit(Addon.java:52) ~[Addon.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ~[Loader.class:?] … 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.RenderGlobal at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_92] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_92] at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_92] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_92] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_92] at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_92] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:101) ~[EventBus.class:?] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:85) ~[EventBus.class:?] at Emox.Addon.preInit(Addon.java:52) ~[Addon.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ~[Loader.class:?] … 5 more Caused by: java.lang.RuntimeException: Attempted to load class bma for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) ~[forge-1.7.10-10.13.4.1614.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_92] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_92] at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_92] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_92] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_92] at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_92] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:101) ~[EventBus.class:?] at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:85) ~[EventBus.class:?] at Emox.Addon.preInit(Addon.java:52) ~[Addon.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?] at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ~[Loader.class:?] … 5 more [00:54:45] [Server thread/ERROR]: This crash report has been saved to: /home/minecraft/servers/mine94406/./crash-reports/crash-2016-07-11_00.54.45-server.txt
[size=mediumCrash Report: ]
–-- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 11/07/16 00:54 Description: Exception in server tick loop cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/RenderGlobal at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:314) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:117) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/RenderGlobal at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.getConstructor(Class.java:1825) at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:101) at cpw.mods.fml.common.eventhandler.EventBus.register(EventBus.java:85) at Emox.Addon.preInit(Addon.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ... 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.RenderGlobal at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bma for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Linux (amd64) version 3.14.32-xxxx-std-ipv6-64-hz1000 Java Version: 1.8.0_92, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 375026904 bytes (357 MB) / 518979584 bytes (494 MB) up to 3113877504 bytes (2969 MB) JVM Flags: 20 total; -Xincgc -XX:+UseParNewGC -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -Xnoclassgc -Xoss4M -Xss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -Xmx3072M -Xms512M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 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 UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614.jar) UCH Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614.jar) UCE Emox{1.0.1} [EmoxMod] (Emox-1.0.1.jar) Profiler Position: N/A (disabled) Is Modded: Definitely; Server brand changed to 'fml,forge' Type: Dedicated Server (map_server.txt)
Merci si quelqu’un peut me répondre (vite si possible) merci d’avance
-
Je ne ferai pas l’effort de chercher tant que tu ne mettras pas le crash report dans des balises code
-
@‘Plaigon’:
Je ne ferai pas l’effort de chercher tant que tu ne mettras pas le crash report dans des balises code
Comment ça je ne comprend pas ou doit etre mit la balise et comment faire ?
-
-
tu m’es ton code entre […] et [\…]
Plaigon c’est pas un probleme de side ? Je dis as tout mais bon je pense que c’est ça -
@‘moscaphone421’:
tu m’es ton code entre […] et [\…]
Plaigon c’est pas un probleme de side ? Je dis as tout mais bon je pense que c’est çapeux tu préciser stp je comprend pas vraiment ce que vous voulez dire y’a moyen d’avoir un exemple ?___Sérieux s’il te plait j’ai mis beacoup de temps pour coder le mode sa serait vraiment cool que tu m’aides
-
Fait sa :
[code]Coucou c’est du code[/code]
Sans les étoileCoucou c'est du code
-
@VDD(Déso mais je n’arriverai jamais à réécrire ton pseudo xD)
La balise de citation est pour reprendre les paroles de quelqu’un, sisi j’te jure. Nan je pense qu’il faut mieux utiliser la balise code, comme ceci :tu copies-colles ton rapport de crash ici
@mosca
Tu as raison, c’est un problème lié au serveur qui veut accéder à la classe RenderGlobal, qui est uniquement client. Envoie nous ta classe Addon, le problème semble venir de la ligne 52 -
@‘Plaigon’:
@VDD(Déso mais je n’arriverai jamais à réécrire ton pseudo xD)
La balise de citation est pour reprendre les paroles de quelqu’un, sisi j’te jure. Nan je pense qu’il faut mieux utiliser la balise code, comme ceci :tu copies-colles ton rapport de crash ici
@mosca
Tu as raison, c’est un problème lié au serveur qui veut accéder à la classe RenderGlobal, qui est uniquement client. Envoie nous ta classe Addon, le problème semble venir de la ligne 52Voici mon code merdi d’avance :
package Emox; import Init.BlocksMod; import Init.ItemMod; import ItemsMod.ChestFinder; import Proxy.CommonProxy; import WorldMod.WorldGen; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; 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.registry.GameRegistry; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = "1.0.1") public class Addon { public static final String Textures = null; @Instance("Mod") public static Mod insatance; @SidedProxy(clientSide = "Proxy.ClientProxy", serverSide = "Proxy.CommonProxy") public static CommonProxy proxy; public static final CreativeTabs TabEmoxium = new CreativeTabs("Emoxium"){ @Override public Item getTabIconItem(){ return ItemMod.Pomme2; } public int getItemIconDamage(){ return 4; } }; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ItemMod.init(); ItemMod.register(); BlocksMod.init(); BlocksMod.register(); WorldGen.register(); FMLCommonHandler.instance().bus().register(new ChestFinder()); MinecraftForge.EVENT_BUS.register(new ChestFinder()); } @Mod.EventHandler public void Init(FMLInitializationEvent event) { proxy.registersRender(); GameRegistry.addRecipe(new ItemStack(ItemMod.Pomme, 1), new Object[] {"AAA", "AXA", "AAA", Character.valueOf('X'), Items.apple, Character.valueOf('A'), (BlocksMod.BlockM)}); GameRegistry.addRecipe(new ItemStack(ItemMod.Pomme2, 1), new Object[]{"YYY", "YXY", "YYY", Character.valueOf('X'), Items.apple, Character.valueOf('Y'), BlocksMod.BlockE}); //Craft Epee GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{" X ", " X ", " S ", 'X', ItemMod.lingot4, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{"X ", "X ", "S ", 'X', ItemMod.lingot4, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot1, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword2, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot2, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword3, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot3, 'S', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemsword4, 1), new Object[]{" X", " X", " S", 'X', ItemMod.lingot4, 'S', Items.stick}); //Pioche GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot1, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe2, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot2, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe3, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot3, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itempickaxe4, 1), new Object[]{"xxx", " s ", " s ", 'x', ItemMod.lingot4, 's', Items.stick}); //hache GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe1, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot2, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe2, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot1, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe3, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot3, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ItemMod.itemaxe4, 1), new Object[]{"xx ", "xs ", " s ", 'x', ItemMod.lingot4, 's', Items.stick}); //Blocks GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockM, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot1}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockF, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot3}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockA, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot4}); GameRegistry.addRecipe(new ItemStack(BlocksMod.BlockE, 1), new Object[]{"xxx", "xxx", "xxx",'x', ItemMod.lingot2}); } public void postInit(FMLPostInitializationEvent event) {} }
-
La ligne 52 est bien celle-ci ?
FMLCommonHandler.instance().bus().register(new ChestFinder());
Si c’est le cas, il semblerait que l’event dans ChestFinder est client-side onyl. File moi ta classe ChestFinder, stp -
@‘Plaigon’:
La ligne 52 est bien celle-ci ?
FMLCommonHandler.instance().bus().register(new ChestFinder());
Si c’est le cas, il semblerait que l’event dans ChestFinder est client-side onyl. File moi ta classe ChestFinder, stppackage ItemsMod; import Finder.finder; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderWorldLastEvent; public class ChestFinder extends Item { public ChestFinder() { this.setMaxStackSize(1); this.setMaxDamage(108); } @SubscribeEvent public void onWorldRender(RenderWorldLastEvent ev) { if ((Minecraft.getMinecraft().thePlayer.getHeldItem() != null) && ((Minecraft.getMinecraft().thePlayer.getHeldItem().getItem() instanceof ChestFinder)) && (Minecraft.getMinecraft().theWorld.isRemote)) { if (Minecraft.getMinecraft().theWorld != null) { for (int i = 0; i < Minecraft.getMinecraft().theWorld.loadedTileEntityList.size(); i++) { if ((Minecraft.getMinecraft().theWorld.loadedTileEntityList.get(i) instanceof TileEntity)) { TileEntity chest = (TileEntity) Minecraft.getMinecraft().theWorld.loadedTileEntityList.get(i); finder.drawChestESP(chest.xCoord - Minecraft.getMinecraft().thePlayer.lastTickPosX, chest.yCoord - Minecraft.getMinecraft().thePlayer.lastTickPosY, chest.zCoord - Minecraft.getMinecraft().thePlayer.lastTickPosZ); } } } } } @Override public void onUpdate(ItemStack stack, World world, Entity entity, int slotIndex, boolean isInHand) { super.onUpdate(stack, world, entity, slotIndex, isInHand); if (isInHand) { if (world.getTotalWorldTime() % 20 == 0) { if (stack.getItemDamageForDisplay() < stack.getMaxDamage()) { if (!world.isRemote) stack.damageItem(1, (EntityPlayer) entity); } else { ((EntityPlayer) entity).destroyCurrentEquippedItem(); } } } } }
-
Rajoute if(event.getSide() == Side.CLIENT) avant la ligne MinecraftForge.EVENT_BUS.register(new ChestFinder());
Et au passage la ligne juste d’avant (FMLCommonHandler.blabla), ne te sert plus à rien, puisque l’event RenderWorldLastEvent est sur le bus MinecraftForge et non FML
-
Rajoute @SideOnly(Side.CLIENT) au-dessus de ta fonction onWorldRender pour voir si ça résout le problème
-
Bah comme ça t’as l’embarra du choix. Les deux solutions devraient fonctionner
Revois aussi ta convention Java, car un nom de classe tel que finder, qui comme par une minuscule…C’est juste impossible
-
@‘Plaigon’:
Rajoute if(event.getSide() == Side.CLIENT) avant la ligne MinecraftForge.EVENT_BUS.register(new ChestFinder());
Et au passage la ligne juste d’avant (FMLCommonHandler.blabla), ne te sert plus à rien, puisque l’event RenderWorldLastEvent est sur le bus MinecraftForge et non FML
Merci ça marche bien
Y’aurais moyen que tu rejettes un coup d’oeil sur mon launcheur a tête de wither ? -
Mets la balise résolue et je passerai jeter un coup d’œil
#LesBonRéflexesFontLesBonsAmis -
Encore une copie de mon code xD
C’est pas comme ça que tu apprendras.