Résolu Problème IGUIHandler
-
Il faut que tu définisses le prop comme tu l’as fais, mais dans ton constructeur.
Pour le read, tu as bien un read dans ton ExtendedPropInv ? Donc c’est bon, t’a normalement rien a changer comme ton read ne faisait rien à part récupérer les tags du held item, ce qui ne sert à rine dans le cas d’un inv étendu. -
Aymeric en fait le prop ici sert a rien du coup, car dans ma class inv on a viré le read donc le ItemStack content sert plus a rien et le prop ici sert a rien aussi.
ExtendedPropInv prop; @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { // The last parameter must be a multiple of 9 (e.g: 9, 18, 27, 54) // Condition to check if the player has the right item in hand if (ID == 0){ this.prop = ExtendedPropInv.get(player); return new ContainerArma(player.inventory, new InventaireArma(54, player)); } return null; }
PS: toujours le crash
-
Ah mais il a jamais servi, normalement, le prop, en tous cas tu peux l’enlever.
Toujours le crash ? Okay mais quoi cette fois si ? -
[15:11:30] [main/INFO] [GradleStart]: Extra: [] [15:11:30] [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, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [15:11:30] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading [15:11:30] [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 [15:11:30] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [15:11:30] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [15:11:30] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [15:11:30] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [15:11:30] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [15:11:30] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [15:11:31] [main/INFO]: Setting user: Player959 [15:11:31] [Client thread/INFO]: LWJGL Version: 2.9.1 [15:11:32] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [15:11:32] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized [15:11:32] [Client thread/INFO] [FML]: Replaced 183 ore recipies [15:11:32] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [15:11:32] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\Modding\AltisMineModV2\eclipse\mods for mods [15:11:33] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [15:11:33] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, amm] at CLIENT [15:11:33] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, amm] at SERVER [15:11:33] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:AltisMineMod [15:11:33] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [15:11:33] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [15:11:33] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [15:11:33] [Client thread/INFO] [FML]: Applying holder lookups [15:11:33] [Client thread/INFO] [FML]: Holder lookups applied [15:11:33] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:33] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [15:11:34] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [15:11:34] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [15:11:34] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [15:11:34] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:34] [Sound Library Loader/INFO]: Sound engine started [15:11:34] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [15:11:34] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4097_null.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4097_null.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [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/:?] [15:11:34] [Client thread/INFO]: Created: 256x256 textures/items-atlas [15:11:34] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [15:11:34] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:AltisMineMod [15:11:34] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [15:11:34] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4097_null.png java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4097_null.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.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:643) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [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/:?] [15:11:34] [Client thread/INFO]: Created: 256x256 textures/items-atlas [15:11:34] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:34] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [15:11:35] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [15:11:35] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:35] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:35] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [15:11:35] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [15:11:35] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [15:11:35] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [15:11:35] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [15:11:35] [Sound Library Loader/INFO]: Sound engine started [15:11:55] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [15:11:55] [Server thread/INFO]: Generating keypair [15:11:55] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [15:11:55] [Server thread/INFO] [FML]: Applying holder lookups [15:11:55] [Server thread/INFO] [FML]: Holder lookups applied [15:11:55] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1347e4b) [15:11:55] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1347e4b) [15:11:55] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1347e4b) [15:11:55] [Server thread/INFO]: Preparing start region for level 0 [15:11:56] [Server thread/INFO]: Changing view distance to 8, from 10 [15:11:56] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [15:11:56] [Netty IO #1/INFO] [FML]: Client protocol version 1 [15:11:56] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : amm@1.0,FML@7.10.85.1291,Forge@10.13.2.1291,mcp@9.05 [15:11:56] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [15:11:56] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [15:11:56] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [15:11:56] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [15:11:56] [Server thread/INFO]: Player959[local:E:0f3f48e5] logged in with entity id 298 at (-20.139762738988377, 75.0, 335.5954486778282) [15:11:56] [Server thread/INFO]: Player959 joined the game [15:11:58] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at armacraft.net.GUI.InventaireArma.<init>(InventaireArma.java:22) ~[InventaireArma.class:?] at armacraft.net.Proxy.CommonProxy.getServerGuiElement(CommonProxy.java:50) ~[CommonProxy.class:?] at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:35) ~[PacketopenInv$Handler.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:1) ~[PacketopenInv$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:?] [15:11:58] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at armacraft.net.GUI.InventaireArma.<init>(InventaireArma.java:22) ~[InventaireArma.class:?] at armacraft.net.Proxy.CommonProxy.getServerGuiElement(CommonProxy.java:50) ~[CommonProxy.class:?] at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:35) ~[PacketopenInv$Handler.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:1) ~[PacketopenInv$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:?] [15:11:58] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at armacraft.net.GUI.InventaireArma.<init>(InventaireArma.java:22) ~[InventaireArma.class:?] at armacraft.net.Proxy.CommonProxy.getServerGuiElement(CommonProxy.java:50) ~[CommonProxy.class:?] at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:35) ~[PacketopenInv$Handler.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:1) ~[PacketopenInv$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:?] [15:11:58] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.NullPointerException at armacraft.net.GUI.InventaireArma.<init>(InventaireArma.java:22) ~[InventaireArma.class:?] at armacraft.net.Proxy.CommonProxy.getServerGuiElement(CommonProxy.java:50) ~[CommonProxy.class:?] at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:35) ~[PacketopenInv$Handler.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:1) ~[PacketopenInv$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:?] [15:11:58] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel amm: java.lang.NullPointerException at armacraft.net.GUI.InventaireArma.<init>(InventaireArma.java:22) ~[InventaireArma.class:?] at armacraft.net.Proxy.CommonProxy.getServerGuiElement(CommonProxy.java:50) ~[CommonProxy.class:?] at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?] at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:35) ~[PacketopenInv$Handler.class:?] at armacraft.net.Packets.PacketopenInv$Handler.onMessage(PacketopenInv.java:1) ~[PacketopenInv$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:?] [15:11:58] [Server thread/INFO]: Stopping server [15:11:58] [Server thread/INFO]: Saving players [15:11:58] [Server thread/INFO]: Saving worlds [15:11:58] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [15:11:58] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [15:11:58] [Server thread/INFO]: Saving chunks for level 'New World'/The End [15:11:58] [Server thread/INFO] [FML]: Unloading dimension 0 [15:11:58] [Server thread/INFO] [FML]: Unloading dimension -1 [15:11:58] [Server thread/INFO] [FML]: Unloading dimension 1 [15:11:58] [Server thread/INFO] [FML]: Applying holder lookups [15:11:58] [Server thread/INFO] [FML]: Holder lookups applied
Il me semble que c’est pareil.</init></init></init></init></init>
-
Pas forcément comme t’a changer le code, montre ton inv du coup
-
package armacraft.net.GUI; import armacraft.net.ExtendedPropInv; import armacraft.net.Items.Water; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.Constants; public class InventaireArma implements IInventory { private EntityPlayer player; ExtendedPropInv prop; public int size; public InventaireArma(int size, EntityPlayer player) { this.size = size; this.prop.content = new ItemStack; this.player = player; this.prop = ExtendedPropInv.get(player); } /** * This methods reads the content of the NBTTagCompound inside the container * * @param comp * the container NBTTagCompound */ public void readFromNBT(NBTTagCompound comp) { NBTTagList nbtlist = comp.getTagList("a", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < nbtlist.tagCount(); i++) { NBTTagCompound comp1 = nbtlist.getCompoundTagAt(i); int slot = comp1.getInteger("z"); this.prop.content[slot] = ItemStack.loadItemStackFromNBT(comp1); } } /** * This methods saves the content inside the container * * @param comp * the NBTTagCompound to write in */ public void writeToNBT(NBTTagCompound comp) { NBTTagList nbtlist = new NBTTagList(); for (int i = 0; i < this.size; i++) { if (this.prop.content* != null) { NBTTagCompound comp1 = new NBTTagCompound(); comp1.setInteger("Slot", i); this.prop.content*.writeToNBT(comp1); nbtlist.appendTag(comp1); } } comp.setTag("Inventory", nbtlist); } @Override public int getSizeInventory() { return this.size; } @Override public ItemStack getStackInSlot(int index) { return this.prop.content[index]; } @Override public ItemStack decrStackSize(int index, int amount) { ItemStack stack = getStackInSlot(index); if (stack != null) { if (stack.stackSize > amount) { stack = stack.splitStack(amount); if (stack.stackSize == 0) this.prop.content[index] = null; } else { this.prop.content[index] = null; } } return stack; } @Override public ItemStack getStackInSlotOnClosing(int index) { ItemStack stack = getStackInSlot(index); if (stack != null) this.prop.content[index] = null; return stack; } @Override public void setInventorySlotContents(int index, ItemStack stack) { this.prop.content[index] = stack; } @Override public String getInventoryName() { return "amm" + ".inventaire.arma"; } @Override public boolean hasCustomInventoryName() { return false; } @Override public int getInventoryStackLimit() { return 64; } @Override public void markDirty() {} @Override public boolean isUseableByPlayer(EntityPlayer player) { return true; } @Override public void openInventory() { } @Override public void closeInventory() { } /** * Prevents backpack-ception */ @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return !(stack.getItem() instanceof Water); } }
-
T’a fait ce que j’ai dit dans l’autre message à moitié… Il faut que tu définisses this.prop dans ton constructeur, sinon ça marchera pas.
-
Attend, le constructeur c’est pas le code dans le commonproxy ?
-
Whaaaat ? Je parle du constructeur de ton InventaireArma.
-
Est bah le soucis il est ou ?
j’ai ça dedant: this.prop = ExtendedPropInv.get(player); -
Ah oui dsl, j’avais pas vu :-/, mais de tt façon, il faut que tu le mettes avant this.prop.content = ……, car à cette endroit, prop n’est pas encore défini.
-
Pas grave ^^, Effectivement, quand je le met en premier plus de crash mais par contre mon inventaire s’ouvre pas et y’a des soucis avec les packet a l’infinie tu m’avais dis de faire quoi déjà j’ai oublier ^^
-
C’était que à la réception du packet, tu appelles setItem() de ton extended prop et que cette fonction appele sync() qui renvoie un packet.
-
Effectivement ^^, par contre mon inv s’ouvre pas comme si il était cancelled.
-
? Tu ouvres bien le container sur le serveur et le gui sur le client ? Met un System.out.println() dans ton GuiHandler, puis dans tes différents composants pour voir où ça se bloque
-
Je pense que c’est ici le prob.
[19:36:29] [Client thread/INFO] [STDOUT]: [armacraft.net.GUI.ContainerArma:<init>:29]: // il s’ouvre côté client puis serveur
[19:36:29] [Server thread/INFO] [STDOUT]: [armacraft.net.GUI.ContainerArma:<init>:29]:</init></init> -
Je sais pas, pense pas mais possible, alors ouvre uniquement sur le serveur if(!world.isRemote) où tu appelles openGui
-
Ok,
donc j’ai ça maintenant:[21:49:39] [Server thread/INFO] [STDOUT]: [armacraft.net.GUI.ContainerArma:<init>:29]: [21:49:39] [Server thread/INFO] [STDOUT]: [armacraft.net.Packets.PacketInv$Handler:onMessage:69]: [21:49:39] [Server thread/INFO] [STDOUT]: [armacraft.net.Packets.PacketInv$Handler:onMessage:69]: [21:49:39] [Client thread/INFO] [STDOUT]: [armacraft.net.GUI.ContainerArma:<init>:29]: [21:49:39] [Server thread/INFO] [STDOUT]: [armacraft.net.Packets.PacketInv$Handler:onMessage:69]:
Et mon inv s’ouvre pas, pour info j’ouvre mon inv avec un packet qui passe côté serveur .</init></init>
-
Donc t’a une boucle, tu renvoies où le packet ?
-
Je r’envois rien du tout j’ai juste le player.opengui et le if(!world.isremote) dans mon IMessage