Résolu Système de rang
-
Fait voir le code qui fait que tu met guerrier (je suis sûr à 90% que tu as oublié le .markDirty())
-
case 1: if(ServerProxy.RANK.get(this.mc.thePlayer.getUniqueID()) == null){ LegacyMod.network.sendToServer(new PacketGuerrier(EnumRank.GUERRIER)); this.mc.thePlayer.closeScreen(); EntityPlayer player1 = Minecraft.getMinecraft().thePlayer; ChatComponentText text1 = new ChatComponentText("§7Vous avez choisi la classe " + "§4Guerrier!"); player1.addChatComponentMessage(text1); this.mc.thePlayer.closeScreen();
-
Umh … plusieurs problème, actuellement tes rangs sont stockés côté serveur donc si tu essai de récupérer un rang depuis le client tu aura toujours null,
et puis lorsque tu modifie la Map RANK, il faut que tu que marque la classe de sauvegarde comme aillant de besoin de sauvegarder en faisant instanceDeLaClasseDeSauvegarde.markDirty(), il me semble que le paquet ne le fait pas. -
Oui mais j’ai pas de fonction markdirty
-
Elle vient de la classe WorldSavedData, tu devrais l’avoir
-
J’ai fais ça:
LegacyMod.network.sendToServer(new PacketGuerrier(EnumRank.GUERRIER)); RankSave.instance.markDirty(); this.mc.thePlayer.closeScreen(); EntityPlayer player1 = Minecraft.getMinecraft().thePlayer; ChatComponentText text1 = new ChatComponentText("§7Vous avez choisi la classe " + "§4Guerrier!"); player1.addChatComponentMessage(text1);
edit:
Crash:
[17:55:16] [main/INFO] [GradleStart]: username: floriangabet [17:55:16] [main/INFO] [GradleStart]: Extra: [] [17:55:16] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [17:55:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [17:55:16] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading [17:55:16] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre [17:55:16] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [17:55:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [17:55:16] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [17:55:16] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [17:55:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [17:55:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [17:55:16] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [17:55:17] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [17:55:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [17:55:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [17:55:17] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:55:17] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [17:55:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [17:55:17] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [17:55:17] [main/INFO]: Setting user: floriangabet [17:55:18] [Client thread/INFO]: LWJGL Version: 2.9.1 [17:55:18] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [17:55:18] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized [17:55:18] [Client thread/INFO] [FML]: Replaced 183 ore recipies [17:55:18] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [17:55:18] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods [17:55:18] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc [17:55:20] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [17:55:20] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT [17:55:20] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER [17:55:20] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [17:55:20] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [17:55:20] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [17:55:20] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [17:55:20] [Client thread/INFO] [FML]: Applying holder lookups [17:55:20] [Client thread/INFO] [FML]: Holder lookups applied [17:55:20] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:20] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [17:55:20] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [17:55:20] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:55:20] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [17:55:21] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:21] [Sound Library Loader/INFO]: Sound engine started [17:55:23] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [17:55:23] [Client thread/INFO]: Created: 256x256 textures/items-atlas [17:55:23] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [17:55:23] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [17:55:25] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [17:55:25] [Client thread/INFO]: Created: 256x256 textures/items-atlas [17:55:25] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:25] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [17:55:26] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [17:55:26] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:26] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:26] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [17:55:26] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [17:55:26] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:55:26] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [17:55:26] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [17:55:26] [Sound Library Loader/INFO]: Sound engine started [17:55:46] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [17:55:46] [Server thread/INFO]: Generating keypair [17:55:46] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [17:55:46] [Server thread/INFO] [FML]: Applying holder lookups [17:55:46] [Server thread/INFO] [FML]: Holder lookups applied [17:55:46] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@594bbb) [17:55:47] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@594bbb) [17:55:47] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@594bbb) [17:55:47] [Server thread/INFO]: Preparing start region for level 0 [17:55:47] [Server thread/INFO]: Changing view distance to 8, from 10 [17:55:48] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [17:55:48] [Netty IO #1/INFO] [FML]: Client protocol version 1 [17:55:48] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05 [17:55:48] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [17:55:48] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [17:55:48] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [17:55:48] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [17:55:48] [Server thread/INFO]: floriangabet[local:E:22c73b3f] logged in with entity id 334 at (-123.86527099380373, 76.0, 273.7740968576951) [17:55:48] [Server thread/INFO]: floriangabet joined the game [17:55:52] [Server thread/INFO]: Saving and pausing game… [17:55:52] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [17:55:52] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [17:55:52] [Server thread/INFO]: Saving chunks for level 'New World'/The End [17:55:53] [Server thread/INFO]: Stopping server [17:55:53] [Server thread/INFO]: Saving players [17:55:53] [Server thread/INFO]: Saving worlds [17:55:53] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [17:55:53] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [17:55:53] [Server thread/INFO]: Saving chunks for level 'New World'/The End [17:55:53] [Server thread/INFO] [FML]: Unloading dimension 0 [17:55:53] [Server thread/INFO] [FML]: Unloading dimension -1 [17:55:53] [Server thread/INFO] [FML]: Unloading dimension 1 [17:55:53] [Server thread/INFO] [FML]: Applying holder lookups [17:55:53] [Server thread/INFO] [FML]: Holder lookups applied [17:55:53] [Client thread/FATAL]: Reported exception thrown! net.minecraft.util.ReportedException: Updating screen events at net.minecraft.client.Minecraft.runTick(Minecraft.java:1734) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NullPointerException at net.legacymod.gui.ClassesGUI.actionPerformed(ClassesGUI.java:95) ~[ClassesGUI.class:?] at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:252) ~[GuiScreen.class:?] at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344) ~[GuiScreen.class:?] at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313) ~[GuiScreen.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1720) ~[Minecraft.class:?] … 11 more [17:55:53] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // Sorry :( Time: 04/07/16 17:55 Description: Updating screen events java.lang.NullPointerException: Updating screen events at net.legacymod.gui.ClassesGUI.actionPerformed(ClassesGUI.java:95) at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:252) at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344) at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1720) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) 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:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.legacymod.gui.ClassesGUI.actionPerformed(ClassesGUI.java:95) at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:252) at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344) at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313) -- Affected screen -- Details: Screen name: net.legacymod.gui.ClassesGUI -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['floriangabet'/334, l='MpServer', x=-123,84, y=77,62, z=270,83]] Chunk stats: MultiplayerChunkCache: 289, 289 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (-148,64,252), Chunk: (at 12,4,12 in -10,15; contains blocks -160,0,240 to -145,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 214052 game time, 13185 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 103 total; [EntityZombie['Zombie'/256, l='MpServer', x=-107,44, y=31,00, z=348,13], EntityCow['Cow'/257, l='MpServer', x=-102,72, y=71,00, z=344,44], EntityCow['Cow'/258, l='MpServer', x=-104,75, y=68,00, z=345,03], EntityCow['Cow'/259, l='MpServer', x=-109,53, y=67,00, z=348,56], EntityCow['Cow'/266, l='MpServer', x=-97,53, y=69,00, z=201,53], EntityBat['Bat'/267, l='MpServer', x=-84,92, y=37,22, z=223,79], EntityBat['Bat'/269, l='MpServer', x=-79,72, y=40,25, z=229,50], EntityCow['Cow'/270, l='MpServer', x=-74,97, y=64,00, z=283,94], EntityCow['Cow'/271, l='MpServer', x=-67,22, y=72,00, z=303,81], EntityCreeper['Creeper'/272, l='MpServer', x=-72,50, y=31,00, z=345,50], EntityCreeper['Creeper'/274, l='MpServer', x=-52,50, y=14,00, z=202,50], EntityCreeper['Creeper'/275, l='MpServer', x=-51,41, y=14,00, z=205,03], EntitySkeleton['Skeleton'/276, l='MpServer', x=-50,50, y=59,00, z=195,09], EntitySheep['Sheep'/277, l='MpServer', x=-62,59, y=73,72, z=198,50], EntitySpider['Spider'/278, l='MpServer', x=-61,75, y=65,00, z=201,06], EntityCreeper['Creeper'/279, l='MpServer', x=-57,81, y=66,00, z=198,77], EntityCreeper['Creeper'/280, l='MpServer', x=-53,50, y=67,00, z=198,50], EntityCreeper['Creeper'/281, l='MpServer', x=-54,50, y=67,00, z=199,50], EntityCreeper['Creeper'/282, l='MpServer', x=-56,89, y=67,00, z=198,40], EntityCreeper['Creeper'/283, l='MpServer', x=-52,50, y=67,00, z=200,50], EntityCow['Cow'/284, l='MpServer', x=-54,00, y=64,00, z=289,61], EntityCow['Cow'/285, l='MpServer', x=-57,41, y=67,00, z=302,25], EntityClientPlayerMP['floriangabet'/334, l='MpServer', x=-123,84, y=77,62, z=270,83], EntityBat['Bat'/352, l='MpServer', x=-157,75, y=21,45, z=314,44], EntityBat['Bat'/355, l='MpServer', x=-138,00, y=20,00, z=309,00], EntityBat['Bat'/356, l='MpServer', x=-145,38, y=20,00, z=322,22], EntityBat['Bat'/358, l='MpServer', x=-150,41, y=24,70, z=305,75], EntityCow['Cow'/131, l='MpServer', x=-194,47, y=68,00, z=203,47], EntityCow['Cow'/132, l='MpServer', x=-195,53, y=67,00, z=204,53], EntityCow['Cow'/133, l='MpServer', x=-199,25, y=66,00, z=195,47], EntityCow['Cow'/135, l='MpServer', x=-194,38, y=73,00, z=211,59], EntityCow['Cow'/137, l='MpServer', x=-196,28, y=63,00, z=299,31], EntityCow['Cow'/138, l='MpServer', x=-201,47, y=71,00, z=313,28], EntityChicken['Chicken'/139, l='MpServer', x=-193,41, y=68,00, z=318,63], EntityCow['Cow'/152, l='MpServer', x=-178,47, y=73,00, z=202,22], EntityPig['Pig'/153, l='MpServer', x=-188,41, y=78,00, z=236,31], EntityPig['Pig'/154, l='MpServer', x=-179,92, y=73,00, z=269,56], EntityZombie['Zombie'/155, l='MpServer', x=-183,27, y=29,00, z=304,86], EntityChicken['Chicken'/156, l='MpServer', x=-185,63, y=67,00, z=313,56], EntityZombie['Zombie'/157, l='MpServer', x=-177,94, y=39,00, z=320,59], EntityCow['Cow'/158, l='MpServer', x=-180,81, y=68,00, z=331,78], EntityPig['Pig'/159, l='MpServer', x=-177,53, y=65,00, z=327,53], EntityCow['Cow'/160, l='MpServer', x=-184,03, y=67,00, z=322,44], EntityCow['Cow'/161, l='MpServer', x=-186,22, y=68,00, z=323,00], EntityCow['Cow'/162, l='MpServer', x=-191,50, y=69,00, z=321,38], EntityCow['Cow'/163, l='MpServer', x=-183,53, y=67,00, z=323,66], EntityCreeper['Creeper'/170, l='MpServer', x=-169,50, y=17,00, z=216,66], EntityCreeper['Creeper'/171, l='MpServer', x=-167,63, y=16,00, z=221,00], EntityChicken['Chicken'/172, l='MpServer', x=-166,63, y=65,00, z=302,56], EntityCow['Cow'/173, l='MpServer', x=-170,59, y=66,00, z=297,38], EntitySkeleton['Skeleton'/174, l='MpServer', x=-161,50, y=21,00, z=305,50], EntityBat['Bat'/175, l='MpServer', x=-156,69, y=23,27, z=315,58], EntityBat['Bat'/176, l='MpServer', x=-166,51, y=39,33, z=336,55], EntityCow['Cow'/177, l='MpServer', x=-165,61, y=63,00, z=322,56], EntityCow['Cow'/178, l='MpServer', x=-162,66, y=64,00, z=334,25], EntityZombie['Zombie'/179, l='MpServer', x=-173,91, y=39,00, z=346,59], EntityCow['Cow'/180, l='MpServer', x=-162,34, y=64,00, z=340,63], EntityZombie['Zombie'/186, l='MpServer', x=-146,50, y=43,00, z=234,50], EntityCreeper['Creeper'/187, l='MpServer', x=-148,50, y=31,00, z=282,50], EntityZombie['Zombie'/188, l='MpServer', x=-153,00, y=54,00, z=273,44], EntityCreeper['Creeper'/189, l='MpServer', x=-148,50, y=31,00, z=290,50], EntityZombie['Zombie'/190, l='MpServer', x=-153,40, y=20,00, z=313,60], EntityZombie['Zombie'/191, l='MpServer', x=-146,66, y=20,00, z=319,34], EntityCreeper['Creeper'/192, l='MpServer', x=-150,50, y=20,00, z=319,50], EntityCreeper['Creeper'/193, l='MpServer', x=-148,44, y=21,00, z=306,69], EntityEnderman['Enderman'/194, l='MpServer', x=-158,50, y=41,00, z=315,50], EntityChicken['Chicken'/195, l='MpServer', x=-153,47, y=62,11, z=318,53], EntityChicken['Chicken'/196, l='MpServer', x=-156,53, y=62,39, z=318,31], EntityZombie['Zombie'/197, l='MpServer', x=-148,63, y=20,00, z=322,59], EntityCow['Cow'/198, l='MpServer', x=-148,81, y=63,00, z=324,88], EntityChicken['Chicken'/199, l='MpServer', x=-144,84, y=63,00, z=343,56], EntityCow['Cow'/207, l='MpServer', x=-131,53, y=71,00, z=201,28], EntityBat['Bat'/208, l='MpServer', x=-127,40, y=47,00, z=223,06], EntityZombie['Zombie'/209, l='MpServer', x=-130,50, y=36,00, z=253,50], EntityZombie['Zombie'/210, l='MpServer', x=-129,50, y=36,00, z=251,50], EntityBat['Bat'/211, l='MpServer', x=-142,28, y=24,23, z=315,39], EntityChicken['Chicken'/212, l='MpServer', x=-132,53, y=61,00, z=304,56], EntityCow['Cow'/213, l='MpServer', x=-132,25, y=63,00, z=312,28], EntitySkeleton['Skeleton'/214, l='MpServer', x=-134,25, y=18,00, z=322,16], EntityZombie['Zombie'/215, l='MpServer', x=-139,41, y=22,00, z=321,53], EntityCow['Cow'/216, l='MpServer', x=-143,28, y=63,00, z=330,28], EntityCow['Cow'/217, l='MpServer', x=-138,77, y=63,00, z=327,36], EntityCreeper['Creeper'/218, l='MpServer', x=-132,63, y=24,00, z=344,16], EntityCreeper['Creeper'/219, l='MpServer', x=-131,50, y=24,00, z=340,50], EntityZombie['Zombie'/229, l='MpServer', x=-115,50, y=44,00, z=251,50], EntityZombie['Zombie'/230, l='MpServer', x=-125,41, y=19,00, z=298,00], EntityZombie['Zombie'/231, l='MpServer', x=-124,75, y=19,00, z=299,88], EntityZombie['Zombie'/232, l='MpServer', x=-129,13, y=57,81, z=294,63], EntityCreeper['Creeper'/233, l='MpServer', x=-117,09, y=27,00, z=319,31], EntityPig['Pig'/234, l='MpServer', x=-113,80, y=68,00, z=305,53], EntitySpider['Spider'/235, l='MpServer', x=-114,81, y=27,00, z=321,91], EntitySpider['Spider'/236, l='MpServer', x=-123,00, y=24,00, z=326,13], EntitySkeleton['Skeleton'/237, l='MpServer', x=-115,91, y=28,00, z=327,91], EntitySkeleton['Skeleton'/238, l='MpServer', x=-116,78, y=28,00, z=327,47], EntityCow['Cow'/239, l='MpServer', x=-120,19, y=62,00, z=350,53], EntityCow['Cow'/240, l='MpServer', x=-127,53, y=64,00, z=350,47], EntityCreeper['Creeper'/242, l='MpServer', x=-122,00, y=46,00, z=352,50], EntityCreeper['Creeper'/243, l='MpServer', x=-121,34, y=46,00, z=353,66], EntityCreeper['Creeper'/251, l='MpServer', x=-102,70, y=43,00, z=222,52], EntityCreeper['Creeper'/252, l='MpServer', x=-101,86, y=43,00, z=223,20], EntitySkeleton['Skeleton'/253, l='MpServer', x=-106,94, y=29,00, z=311,50], EntitySkeleton['Skeleton'/254, l='MpServer', x=-100,50, y=26,00, z=328,50], EntityZombie['Zombie'/255, l='MpServer', x=-107,75, y=15,00, z=320,96]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:973) at net.minecraft.client.main.Main.main(Main.java:164) 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:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 827519000 bytes (789 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available lc{1.0} [lc] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 368.39, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [[1.10] Firewolf v1.36.zip] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) [17:55:53] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\.\crash-reports\crash-2016-07-04_17.55.53-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
-
L’instance de RankSave est côté serveur, lorsque le joueur se connecte le serveur doit envoyer un paquet au client lui disant si il doit choisir un rang, si oui le client ouvre le gui, le joueur choisit son rang puis le client envoie un paquet au serveur qui ajoute le rang à la HashMap puis fait un RankSave.markDity()
-
j’ai un soucis quand je fais RankSave.markDirty(); bah y’a une érreur et il me dis comme quoi il n’est pas static
-
Olala, tu pourrais un peu réfléchir, je faisais référence à l’instance de ta classe RankSave dont tu te sert pour enregistrer le tout
-
Et bah c’est bon alors:
[font=Ubuntu, sans-serifle joueur choisit son rang puis le client envoie un paquet au serveur qui ajoute le rang à la HashMap puis fait un RankSave.markDity()][font=Ubuntu, sans-serif->]
[font=Ubuntu, sans-serifcase 1:] [font=Ubuntu, sans-serifLegacyMod.network.sendToServer(new PacketGuerrier(EnumRank.GUERRIER));] [font=Ubuntu, sans-serifRankSave.instance.markDirty();] [font=Ubuntu, sans-serifthis.mc.thePlayer.closeScreen(); ] [font=Ubuntu, sans-serifbreak;]
-
Le RankSave.instance.markDirty() doit se faire côté serveur, donc à la réception du paquet par le serveur
-
@‘BrokenSwing’:
Le RankSave.instance.markDirty() doit se faire côté serveur, donc à la réception du paquet par le serveur
Donc dans le ServerProxy?
-
Dans le packet que t’envoie du client au serveur, dans la fonction onMessage.
Envoyé de mon RAINBOW LITE 4G en utilisant Tapatalk
-
Ah mais j’ai essayer aussi dans le onMessage mais j’ai eu un crash je t’envoie ça!
Crash:
[16:06:47] [main/INFO] [GradleStart]: username: floriangabet [16:06:47] [main/INFO] [GradleStart]: Extra: [] [16:06:47] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [16:06:48] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading [16:06:48] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre [16:06:48] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [16:06:48] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [16:06:48] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:06:48] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [16:06:48] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [16:06:48] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [16:06:49] [main/INFO]: Setting user: floriangabet [16:06:49] [Client thread/INFO]: LWJGL Version: 2.9.1 [16:06:50] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [16:06:50] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized [16:06:50] [Client thread/INFO] [FML]: Replaced 183 ore recipies [16:06:50] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [16:06:50] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods [16:06:50] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc [16:06:51] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [16:06:51] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT [16:06:51] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER [16:06:51] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [16:06:51] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [16:06:51] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [16:06:51] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [16:06:52] [Client thread/INFO] [FML]: Applying holder lookups [16:06:52] [Client thread/INFO] [FML]: Holder lookups applied [16:06:52] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:52] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [16:06:52] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:06:52] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:06:52] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:06:52] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:52] [Sound Library Loader/INFO]: Sound engine started [16:06:54] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [16:06:55] [Client thread/INFO]: Created: 256x256 textures/items-atlas [16:06:55] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [16:06:55] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [16:06:57] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [16:06:57] [Client thread/INFO]: Created: 256x256 textures/items-atlas [16:06:57] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:57] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [16:06:57] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [16:06:57] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:57] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:57] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [16:06:57] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [16:06:57] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [16:06:57] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [16:06:58] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [16:06:58] [Sound Library Loader/INFO]: Sound engine started [16:07:00] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [16:07:00] [Server thread/INFO]: Generating keypair [16:07:00] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [16:07:01] [Server thread/INFO] [FML]: Applying holder lookups [16:07:01] [Server thread/INFO] [FML]: Holder lookups applied [16:07:01] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@7d2c84) [16:07:01] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@7d2c84) [16:07:01] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@7d2c84) [16:07:01] [Server thread/INFO]: Preparing start region for level 0 [16:07:01] [Server thread/INFO]: Changing view distance to 8, from 10 [16:07:02] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [16:07:02] [Netty IO #1/INFO] [FML]: Client protocol version 1 [16:07:02] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05 [16:07:02] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [16:07:02] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [16:07:02] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [16:07:02] [Server thread/INFO]: floriangabet[local:E:48fefcf4] logged in with entity id 349 at (-136.1490038289861, 76.0, 271.9635506676959) [16:07:02] [Server thread/INFO]: floriangabet joined the game [16:07:02] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [16:07:03] [Server thread/INFO]: Saving and pausing game… [16:07:03] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [16:07:03] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [16:07:03] [Server thread/INFO]: Saving chunks for level 'New World'/The End [16:07:04] [Client thread/INFO]: [CHAT] §7Vous avez choisi la classe §4Guerrier! [16:07:04] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [16:07:04] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [16:07:04] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel lc: java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [16:07:04] [Server thread/INFO]: Stopping server [16:07:04] [Server thread/INFO]: Saving players [16:07:04] [Server thread/INFO]: Saving worlds [16:07:04] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [16:07:04] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [16:07:04] [Server thread/INFO]: Saving chunks for level 'New World'/The End [16:07:05] [Server thread/INFO] [FML]: Unloading dimension 0 [16:07:05] [Server thread/INFO] [FML]: Unloading dimension -1 [16:07:05] [Server thread/INFO] [FML]: Unloading dimension 1 [16:07:05] [Server thread/INFO] [FML]: Applying holder lookups [16:07:05] [Server thread/INFO] [FML]: Holder lookups applied
edit:
la ligne 47 de PacketGuerrier c’est:
RankSave.instance.markDirty();
-
l’instance est surement null.
Envoies la classe RankSave.Et utilises la base code pour les logs plutôt que la balise java. Pas besoin des couleurs java sur des logs ^^
-
Ok désolé x)
RankSave:
public class RankSave extends WorldSavedData { public static RankSave instance; /** /* Ce constructeur est obligatoire */ public static RankSave load(World w) { MapStorage storage = w.perWorldStorage; //On récupère la mapStorage de la dimension final String KEY = ServerProxy.SAVE_KEY; // Si vous avez choisis de faire une fonction static String. Quoiqu'il en soit, la variable KEY que nous utiliserons ici représente votre clé. Si vous utilisez un attribut static, utilisez le directement. RankSave result = (RankSave)storage.loadData(RankSave.class, KEY);//On charge nos données if (result == null) { //Si nos données n'existe pas, … result = new RankSave(KEY);// Alors on les crée ... storage.setData(KEY, result);// Et on les ajoutes à la mapStorage. } return result; //On retourne notre objet qui représente les données a sauvegarder } public RankSave(String key) { super(key); } @Override public void readFromNBT(NBTTagCompound compound) { NBTTagList rankList= (NBTTagList)compound.getTag("rankList"); for(int i = 0; i < rankList.tagCount(); i++) { NBTTagCompound rankTag = rankList.getCompoundTagAt(i); ServerProxy.RANK.put(UUID.fromString(rankTag.getString("uuid")), EnumRank.valueOf(rankTag.getString("rank"))); } } @Override public void writeToNBT(NBTTagCompound compound) { NBTTagList rankList = new NBTTagList(); Iterator<entry<uuid, enumrank="">> iterator = ServerProxy.RANK.entrySet().iterator(); while(iterator.hasNext()) { NBTTagCompound rankTag = new NBTTagCompound(); Entry <uuid, enumrank="">entry = iterator.next(); rankTag.setString("uuid", entry.getKey().toString()); rankTag.setString("rank", entry.getValue().name()); rankList.appendTag(rankTag); } compound.setTag("rankList", rankList); } } ```</uuid,></entry<uuid,>
-
Tu ne définis nulle part à quoi est égal instance, dans le constructeur, rajoute “instance = this;” après le “super(KEY);”
-
Toujours un crash:
[18:20:56] [main/INFO] [GradleStart]: username: floriangabet [18:20:56] [main/INFO] [GradleStart]: Extra: [] [18:20:56] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [18:20:56] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [18:20:56] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading [18:20:56] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre [18:20:56] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [18:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [18:20:56] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [18:20:56] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [18:20:56] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [18:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [18:20:57] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [18:20:57] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [18:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [18:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [18:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [18:20:57] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [18:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [18:20:57] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [18:20:58] [main/INFO]: Setting user: floriangabet [18:20:58] [Client thread/INFO]: LWJGL Version: 2.9.1 [18:20:58] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [18:20:58] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized [18:20:58] [Client thread/INFO] [FML]: Replaced 183 ore recipies [18:20:58] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [18:20:59] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods [18:20:59] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc [18:21:00] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [18:21:00] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT [18:21:00] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER [18:21:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [18:21:00] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [18:21:00] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [18:21:00] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [18:21:00] [Client thread/INFO] [FML]: Applying holder lookups [18:21:00] [Client thread/INFO] [FML]: Holder lookups applied [18:21:00] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:00] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [18:21:00] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [18:21:00] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [18:21:00] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [18:21:01] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:01] [Sound Library Loader/INFO]: Sound engine started [18:21:03] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [18:21:03] [Client thread/INFO]: Created: 256x256 textures/items-atlas [18:21:03] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [18:21:03] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [18:21:05] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [18:21:05] [Client thread/INFO]: Created: 256x256 textures/items-atlas [18:21:05] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:05] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [18:21:06] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [18:21:06] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:06] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:06] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [18:21:06] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [18:21:06] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [18:21:06] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [18:21:06] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [18:21:06] [Sound Library Loader/INFO]: Sound engine started [18:21:08] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [18:21:08] [Server thread/INFO]: Generating keypair [18:21:08] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [18:21:08] [Server thread/INFO] [FML]: Applying holder lookups [18:21:08] [Server thread/INFO] [FML]: Holder lookups applied [18:21:08] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1607a23) [18:21:08] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1607a23) [18:21:08] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1607a23) [18:21:08] [Server thread/INFO]: Preparing start region for level 0 [18:21:09] [Server thread/INFO]: Changing view distance to 8, from 10 [18:21:09] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [18:21:09] [Netty IO #1/INFO] [FML]: Client protocol version 1 [18:21:09] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05 [18:21:09] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [18:21:09] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [18:21:09] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [18:21:09] [Server thread/INFO]: floriangabet[local:E:970dfcd9] logged in with entity id 354 at (-137.33618212258224, 76.0, 264.7910948755564) [18:21:09] [Server thread/INFO]: floriangabet joined the game [18:21:09] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [18:21:13] [Server thread/INFO]: Saving and pausing game… [18:21:13] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [18:21:13] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [18:21:13] [Server thread/INFO]: Saving chunks for level 'New World'/The End [18:21:13] [Client thread/INFO]: [CHAT] §7Vous avez choisi la classe §4Guerrier! [18:21:13] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [18:21:13] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [18:21:13] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel lc: java.lang.NullPointerException at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:47) ~[PacketGuerrier$Handler.class:?] at net.legacymod.packets.PacketGuerrier$Handler.onMessage(PacketGuerrier.java:1) ~[PacketGuerrier$Handler.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?] at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] [18:21:14] [Server thread/INFO]: Stopping server [18:21:14] [Server thread/INFO]: Saving players [18:21:14] [Server thread/INFO]: Saving worlds [18:21:14] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [18:21:14] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [18:21:14] [Server thread/INFO]: Saving chunks for level 'New World'/The End [18:21:14] [Server thread/INFO] [FML]: Unloading dimension 0 [18:21:14] [Server thread/INFO] [FML]: Unloading dimension -1 [18:21:14] [Server thread/INFO] [FML]: Unloading dimension 1 [18:21:14] [Server thread/INFO] [FML]: Applying holder lookups [18:21:14] [Server thread/INFO] [FML]: Holder lookups applied
-
As-tu bien appelé la fonction RankSave.load(le monde) quand tu lances une map sur le serveur ou reçoit le premier packet ? Si tu ne l’as pas fait, fait un null check sur RankSave.instance au début de onMessage puis, si c’est null, appelle la fonction load.
-
Nan je les pas fais je dois le faire ou exactement ? dans un event ?