Packet ExtendedProperties - Crash



  • Bonjour,

    J'ai un crash avec le packet de mon extendedproperties quand je me connecte en solo.

    Voici le crash report:

    
    [17:41:35] [main/INFO] [GradleStart]: username: floriangabet
    [17:41:35] [main/INFO] [GradleStart]: Extra: []
    [17:41:35] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --username, floriangabet, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [17:41:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [17:41:35] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading
    [17:41:35] [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:41:35] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [17:41:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [17:41:35] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [17:41:35] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [17:41:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [17:41:35] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [17:41:35] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [17:41:36] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [17:41:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [17:41:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [17:41:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [17:41:36] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:41:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [17:41:36] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [17:41:37] [Client thread/INFO]: Setting user: floriangabet
    [17:41:38] [Client thread/INFO]: LWJGL Version: 2.9.1
    [17:41:38] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
    [17:41:38] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized
    [17:41:38] [Client thread/INFO] [FML]: Replaced 204 ore recipies
    [17:41:38] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
    [17:41:38] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\CSC\eclipse\mods for mods
    [17:41:39] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
    [17:41:39] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at CLIENT
    [17:41:39] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at SERVER
    [17:41:39] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
    [17:41:39] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [17:41:39] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
    [17:41:39] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [17:41:39] [Client thread/INFO] [FML]: Applying holder lookups
    [17:41:39] [Client thread/INFO] [FML]: Holder lookups applied
    [17:41:39] [Sound Library Loader/INFO]: Starting up SoundSystem…
    [17:41:39] [Thread-7/INFO]: Initializing LWJGL OpenAL
    [17:41:39] [Thread-7/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [17:41:39] [Thread-7/INFO]: OpenAL initialized.
    [17:41:40] [Sound Library Loader/INFO]: Sound engine started
    [17:41:40] [Client thread/ERROR]: Using missing texture, unable to load csc:textures/items/clef.png
    java.io.FileNotFoundException: csc:textures/items/clef.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:70) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:116) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadSprites(TextureMap.java:83) [TextureMap.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:94) [ModelLoader.class:?]
    at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) [ModelManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:124) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:507) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:356) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:117) [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/:?]
    [17:41:40] [Client thread/INFO]: Created: 512x512 textures-atlas
    [17:41:41] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
    [17:41:41] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
    [17:41:41] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
    [17:41:41] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
    [17:41:41] [Client thread/INFO]: SoundSystem shutting down…
    [17:41:41] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
    [17:41:41] [Sound Library Loader/INFO]: Starting up SoundSystem…
    [17:41:41] [Thread-9/INFO]: Initializing LWJGL OpenAL
    [17:41:41] [Thread-9/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [17:41:41] [Thread-9/INFO]: OpenAL initialized.
    [17:41:42] [Sound Library Loader/INFO]: Sound engine started
    [17:41:42] [Client thread/ERROR]: Using missing texture, unable to load csc:textures/items/clef.png
    java.io.FileNotFoundException: csc:textures/items/clef.png
    at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:70) ~[FallbackResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:116) [TextureMap.class:?]
    at net.minecraft.client.renderer.texture.TextureMap.loadSprites(TextureMap.java:83) [TextureMap.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:94) [ModelLoader.class:?]
    at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) [ModelManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?]
    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:767) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:306) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:521) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:356) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:117) [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/:?]
    [17:41:42] [Client thread/INFO]: Created: 512x512 textures-atlas
    [17:41:42] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
    [17:41:42] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
    [17:41:44] [Server thread/INFO]: Starting integrated minecraft server version 1.8
    [17:41:44] [Server thread/INFO]: Generating keypair
    [17:41:44] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
    [17:41:44] [Server thread/INFO] [FML]: Applying holder lookups
    [17:41:44] [Server thread/INFO] [FML]: Holder lookups applied
    [17:41:44] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@17781e8)
    [17:41:44] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@17781e8)
    [17:41:44] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@17781e8)
    [17:41:44] [Server thread/INFO]: Preparing start region for level 0
    [17:41:45] [Server thread/INFO] [STDOUT]: [com.CSC.net.Main:onServerStarting:74]: ranksaveload
    [17:41:45] [Server thread/INFO]: Changing view distance to 8, from 10
    [17:41:45] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 1
    [17:41:45] [Netty Server IO #1/INFO] [FML]: Client protocol version 1
    [17:41:45] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : csc@1.0,FML@8.0.37.1334,Forge@11.14.1.1334,mcp@9.05
    [17:41:45] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
    [17:41:45] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
    [17:41:45] [Server thread/ERROR] [FML]: Failed to load extended properties for ExtPropCSC.  This is a mod issue.
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.NullPointerException
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at com.CSC.net.extended.CSCExtendedProp.loadNBTData(CSCExtendedProp.java:53)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.entity.Entity.readFromNBT(Entity.java:1710)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.management.ServerConfigurationManager.readPlayerDataFromFile(ServerConfigurationManager.java:300)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:123)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:218)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:49)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:182)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:270)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:208)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:797)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540)
    [17:41:45] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.Thread.run(Thread.java:745)
    [17:41:45] [Server thread/INFO]: floriangabet[local:E:213d07d6] logged in with entity id 262 at (-277.71195638205495, 71.0, 202.2821990082207)
    [17:41:45] [Server thread/INFO]: floriangabet a rejoint la partie
    [17:41:45] [Netty Local Client IO #0/ERROR] [FML]: SimpleChannelHandlerWrapper exception
    java.lang.NullPointerException
    at com.CSC.net.extended.CSCExtendedProp.get(CSCExtendedProp.java:35) ~[CSCExtendedProp.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:63) ~[PacketMoney$ClientHandler.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:1) ~[PacketMoney$ClientHandler.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) ~[SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:363) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:230) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.channel.local.LocalEventLoop.run(LocalEventLoop.java:33) [LocalEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    [17:41:45] [Netty Local Client IO #0/ERROR] [FML]: SimpleChannelHandlerWrapper exception
    java.lang.NullPointerException
    at com.CSC.net.extended.CSCExtendedProp.get(CSCExtendedProp.java:35) ~[CSCExtendedProp.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:63) ~[PacketMoney$ClientHandler.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:1) ~[PacketMoney$ClientHandler.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) ~[SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:363) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:230) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.channel.local.LocalEventLoop.run(LocalEventLoop.java:33) [LocalEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    [17:41:45] [Netty Local Client IO #0/ERROR] [FML]: There was a critical exception handling a packet on channel csc:
    java.lang.NullPointerException
    at com.CSC.net.extended.CSCExtendedProp.get(CSCExtendedProp.java:35) ~[CSCExtendedProp.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:63) ~[PacketMoney$ClientHandler.class:?]
    at com.CSC.net.item.packet.PacketMoney$ClientHandler.onMessage(PacketMoney.java:1) ~[PacketMoney$ClientHandler.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
    at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) ~[SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:4.0.15.Final]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) ~[DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:88) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:144) [NetworkManager.class:?]
    at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:469) [NetworkManager.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:363) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:230) [NetworkDispatcher.class:?]
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:49) [NetworkDispatcher.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [SimpleChannelInboundHandler.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:338) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:324) [DefaultChannelHandlerContext.class:4.0.15.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:312) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:44) [LocalChannel.class:4.0.15.Final]
    at io.netty.channel.local.LocalChannel$6.run(LocalChannel.java:298) [LocalChannel$6.class:4.0.15.Final]
    at io.netty.channel.local.LocalEventLoop.run(LocalEventLoop.java:33) [LocalEventLoop.class:4.0.15.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [SingleThreadEventExecutor$2.class:4.0.15.Final]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    [17:41:45] [Server thread/INFO]: floriangabet lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
    [17:41:45] [Server thread/INFO]: floriangabet a quitté la partie
    [17:41:46] [Server thread/INFO]: Stopping singleplayer server as player logged out
    [17:41:46] [Server thread/INFO]: Stopping server
    [17:41:46] [Server thread/INFO]: Saving players
    [17:41:46] [Server thread/INFO]: Saving worlds
    [17:41:46] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
    [17:41:46] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
    [17:41:46] [Server thread/INFO]: Saving chunks for level 'New World'/The End
    [17:41:46] [Server thread/INFO] [FML]: Unloading dimension 0
    [17:41:46] [Server thread/INFO] [FML]: Unloading dimension -1
    [17:41:46] [Server thread/INFO] [FML]: Unloading dimension 1
    [17:41:46] [Server thread/INFO] [FML]: Applying holder lookups
    [17:41:46] [Server thread/INFO] [FML]: Holder lookups applied
    
    

    Class du packet:

    
    package com.CSC.net.item.packet;
    
    import com.CSC.net.extended.CSCExtendedProp;
    import com.CSC.net.properties.EnumRank;
    import com.CSC.net.proxy.ServerProxy;
    import com.CSC.net.save.RankSave;
    
    import io.netty.buffer.ByteBuf;
    import net.minecraft.client.Minecraft;
    import net.minecraft.entity.player.EntityPlayerMP;
    import net.minecraftforge.fml.common.network.ByteBufUtils;
    import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
    import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
    import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    public class PacketMoney implements IMessage{
    
    private long maxMoney, Money;
    
    public PacketMoney(){
    
    }
    public PacketMoney(long money, long maxmoney){
    this.maxMoney = maxmoney;
    this.Money = money;
    }
    
    @Override
    public void fromBytes(ByteBuf buf) {
    this.maxMoney = buf.readLong();
    this.Money = buf.readLong();
    
    }
    
    @Override
    public void toBytes(ByteBuf buf) {
    buf.writeLong(maxMoney);
    buf.writeLong(Money);
    
    }
    
    public static class ServerHandler implements IMessageHandler <packetmoney, imessage="">{
           @Override
           public IMessage onMessage(PacketMoney message, MessageContext ctx)
           {
               EntityPlayerMP player = ctx.getServerHandler().playerEntity;
               CSCExtendedProp props = CSCExtendedProp.get(player);
               props.maxMoney = message.maxMoney;
               props.money = message.Money;
               return message;
           }
       }
    
       public static class ClientHandler implements IMessageHandler <packetmoney, imessage="">{
           @Override
           @SideOnly(Side.CLIENT)
           public IMessage onMessage(PacketMoney message, MessageContext ctx)
           {
            CSCExtendedProp props = CSCExtendedProp.get(Minecraft.getMinecraft().thePlayer);// ligne 63
            props.maxMoney = message.maxMoney;
               props.money = message.Money;
               return message;
           }
       }
    
    }
    
    

    Enregistrement du packet:

    network.registerMessage(PacketMoney.ClientHandler.class, PacketMoney.class, 8, Side.CLIENT);
    
    network.registerMessage(PacketMoney.ServerHandler.class, PacketMoney.class, 8, Side.SERVER);
    

    Extended:

    
    package com.CSC.net.extended;
    
    import com.CSC.net.Main;
    import com.CSC.net.item.packet.PacketMoney;
    import com.CSC.net.proxy.CommonProxy;
    
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.player.EntityPlayerMP;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.world.World;
    import net.minecraftforge.common.IExtendedEntityProperties;
    
    public class CSCExtendedProp implements IExtendedEntityProperties {
    
    public final static String EXT_PROP_NAME = "ExtPropCSC";
    
    private final EntityPlayer player;
    
    public long money;
        public long maxMoney;
    
        public CSCExtendedProp(EntityPlayer player) {
    this.player = player;
    this.money = 0;
    this.maxMoney = 999999999;
    }
    
        public static final void register(EntityPlayer player) {
    player.registerExtendedProperties(CSCExtendedProp.EXT_PROP_NAME,
    new CSCExtendedProp(player));
    }
    
    public static final CSCExtendedProp get(EntityPlayer player) {
    return (CSCExtendedProp) player.getExtendedProperties(EXT_PROP_NAME);// ligne 35
    }
    
    @Override
    public void saveNBTData(NBTTagCompound compound) {
    
    NBTTagCompound properties = new NBTTagCompound();
    
    properties.setLong("Money", this.money);
    properties.setLong("MaxMoney", this.maxMoney);
    
    compound.setTag(EXT_PROP_NAME, properties);
    }
    
    @Override
    public void loadNBTData(NBTTagCompound compound) {
    NBTTagCompound properties = (NBTTagCompound) compound
    .getTag(EXT_PROP_NAME);
    this.money = properties.getLong("Money");
    this.maxMoney = properties.getLong("MaxMoney");
    }
    
    public final void sync() {
    PacketMoney packetMoney = new PacketMoney(this.maxMoney, this.money);
           //La ligne suivante dépend de votre manière d'envoyer les packets. Celle-ci vient de mon mod, je ne la changerais pas car je ne peux l'appliquer à votre mod, mais elle reste bonne pour un exemple.
              Main.network.sendToServer(new PacketMoney());
    
    if (!player.worldObj.isRemote) {
    EntityPlayerMP player1 = (EntityPlayerMP) player;
                            //Ici, même chose que précédemment, sauf que le packet est envoyé au player.
    Main.network.sendTo(packetMoney, player1);
    }
    }
    
    private static String getSaveKey(EntityPlayer player) {
    return player.getDisplayName() + ":" + EXT_PROP_NAME;
    }
    
    public static void saveProxyData(EntityPlayer player) {
    CSCExtendedProp playerData = CSCExtendedProp.get(player);
    NBTTagCompound savedData = new NBTTagCompound();
    
    playerData.saveNBTData(savedData);
    CommonProxy.storeEntityData(getSaveKey(player), savedData);
    }
    
    public static void loadProxyData(EntityPlayer player) {
    CSCExtendedProp playerData = CSCExtendedProp.get(player);
    NBTTagCompound savedData = CommonProxy
    .getEntityData(getSaveKey(player));
    
    if (savedData != null) {
    playerData.loadNBTData(savedData);
    }
    playerData.sync();
    }
    
    public boolean pay(long amount) {
    boolean sufficient = amount <= this.money;
    
    if (sufficient) {
    this.money -= amount;
    this.sync();
    } else {
    return false;
    }
    
    return sufficient;
    }
    
    public void addMoney(long amount) {
    this.money += amount;
    this.sync();
    }
    
    public long getMoney() {
    return this.money;
    }
    
    public void setMoney(long newMoney) {
    this.money = newMoney;
    this.sync();
    }
    
    @Override
    public void init(Entity entity, World world) {
    // TODO Auto-generated method stub
    
    }
    
    }
    

    Merci d'avance :)</packetmoney,></packetmoney,>



  • Déjà tu as une erreur dans le loadNBTData : il faut vérifier que le joueur a bien le tagCompound


  • Administrateurs

    Minecraft.getMinecraft().thePlayer est null.



  • @'robin4002':

    Minecraft.getMinecraft().thePlayer est null.

    Ahhh mais comment faire pour qu'il ne le soit pas ?


  • Rédacteurs

    Faut être côté client le plus souvent



  • @'BrokenSwing':

    Faut être côté client le plus souvent

    Je suis pas côté client la ?

    1. public static class ClientHandler implements IMessageHandler<PacketMoney, IMessage>
    2.    {
    3.        @Override
    4.        @SideOnly(Side.CLIENT)
    5.        public IMessage onMessage(PacketMoney message, MessageContext ctx)
    6.        {
    7.         CSCExtendedProp props = CSCExtendedProp.get(Minecraft.getMinecraft().thePlayer);// ligne 63
    8.         props.maxMoney = message.maxMoney;
    9.            props.money = message.Money;
    10.            return message;
    11.        }
    12.    }


  • Il est bien côté client sinon le jeu crasherai car il utilise une classe client



  • Je peux faire comment du coup ?


  • Administrateurs

    Tu envoies un paquet trop tôt, le joueur n'est pas encore initialisé quand il reçoit le paquet.
    Essaies de traiter le paquet comme ça :

              IThreadListener thread = FMLCommonHandler.instance().getWorldThread(ctx.netHandler);
    thread.addScheduledTask(new Runnable()
    {
                   @Override
                   public void run()
                   {
                       // ton action
                   }
               });
    


  • Tu utilises quel event pour envoyer le paquet lorsque le joueur se connecte ?



  • @'robin4002':

    Tu envoies un paquet trop tôt, le joueur n'est pas encore initialisé quand il reçoit le paquet.
    Essaies de traiter le paquet comme ça :

              IThreadListener thread = FMLCommonHandler.instance().getWorldThread(ctx.netHandler);
              thread.addScheduledTask(new Runnable()
              {
                   @Override
                   public void run()
                   {
                       // ton action
                   }
               });
    

    Oauip c'est bon merci 🙂