Savoir ce qui il y a dans un slot



  • Salut je cherches à faire une condition avec l'item d'un slot, voici mon code mais il ne marche pas:

    
     @Override
    
            public IMessage onMessage(PaquetHandler message, MessageContext ctx) {
    
            if(message.text.equals("p")){
            if(ctx.getServerHandler().playerEntity.openContainer.getSlot(1).equals(ModHarryPotter.itemPolynectar)){
            System.out.println(String.format("Test"));
            }
            }
                return null;
            }
    

  • Modérateurs

    Ça risque pas de marcher vu que getSlot retourne un slot et teste si c'est un item…



  • Ah ok, alors comment faire ?


  • Administrateurs

    ctx.getServerHandler().playerEntity.openContainer.getSlot(1) != null && ctx.getServerHandler().playerEntity.openContainer.getSlot(1).getItem() == ModHarryPotter.itemPolynectar



  • Ok merci



  • Ca ne marche pas il y a une erreur sur le:

    
    ctx.getServerHandler().playerEntity.openContainer.getSlot(1)
    
    

    Description Resource Path Location Type

    The left-hand side of an assignment must be a variable PaquetHandler.java /Minecraft/src/main/java/com/harrypotter/sosoh/proxy line 41 Java Problem


  • Administrateurs

    Oups, c'est parce que j'ai oublié un point d'exclamation.



  • Je le mets ou ?


  • Administrateurs

    J'ai édité mon message



  • Il y a une nouvelle erreur:
    Description Resource Path Location Type

    The method getItem() is undefined for the type Slot PaquetHandler.java /Minecraft/src/main/java/com/harrypotter/sosoh/proxy line 41 Java Problem

    sur:

    
    ctx.getServerHandler().playerEntity.openContainer.getSlot(1).getItem()
    
    

  • Administrateurs

    Ah il faut peut être mettre getContent avant. Enfin le mieux serait de passer par le tile entity plutôt que le container.



  • Il n'y a pas de .getContent, comment passer par le tile entity ?


  • Administrateurs

    Container c = ctx.getServerHandler().playerEntity.openContainer;
    if(c instanceof TonContainer)
    {
       TonTileEntity tile= ((TonContainer)c).getTile();
       ….
    

    Et il faut créer la fonction

    public TonTileEntity getTile()
    {
       return tonTileentity;
    }
    

    Dans la classe de ton container.



  • J'ai mis ca mais je crash quand je cliques sur le button:
    :::

    [11:55:22] [main/INFO] [GradleStart]: Extra: []
    [11:55:22] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Hugo/.gradle/caches/minecraft/assets, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]
    [11:55:22] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [11:55:22] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
    [11:55:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
    [11:55:22] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
    [11:55:22] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading
    [11:55:22] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_67, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre7
    [11:55:22] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [11:55:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
    [11:55:23] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
    [11:55:23] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [11:55:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [11:55:23] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [11:55:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [11:55:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
    [11:55:23] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [11:55:24] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [11:55:28] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [11:55:28] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
    [11:55:28] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
    [11:55:30] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
    [11:55:30] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
    [11:55:30] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [11:55:36] [main/INFO]: Setting user: Player500
    [11:55:42] [Client thread/INFO]: LWJGL Version: 2.9.1
    [11:55:46] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
    [11:55:46] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized
    [11:55:46] [Client thread/INFO] [FML]: Replaced 182 ore recipies
    [11:55:46] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
    [11:55:47] [Client thread/INFO] [FML]: Searching C:\Users\Hugo\Desktop\Mod Harry Potter\forge-1.7.10-10.13.2.1230-src\eclipse\mods for mods
    [11:55:58] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
    [11:55:59] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modharrypotter] at CLIENT
    [11:55:59] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modharrypotter] at SERVER
    [11:56:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Harry Potter Mod
    [11:56:00] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [11:56:00] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
    [11:56:01] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [11:56:01] [Client thread/INFO] [FML]: Applying holder lookups
    [11:56:01] [Client thread/INFO] [FML]: Holder lookups applied
    [11:56:02] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:02] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
    [11:56:02] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
    [11:56:02] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [11:56:02] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
    [11:56:02] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:02] [Sound Library Loader/INFO]: Sound engine started
    [11:56:11] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.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:582) [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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:12] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
    [11:56:12] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4114_baguettemalefoy.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4114_baguettemalefoy.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:12] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:12] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4112_baguettelestrange.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4112_baguettelestrange.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:13] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4113_baguettepotter.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4113_baguettepotter.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:13] [Client thread/INFO]: Created: 512x256 textures/items-atlas
    [11:56:13] [Client thread/INFO] [STDOUT]: [com.harrypotter.sosoh.proxy.ClientProxy:registerRender:25]: Methodes Client loaded
    [11:56:13] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
    [11:56:13] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Harry Potter Mod
    [11:56:14] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4114_baguettemalefoy.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4114_baguettemalefoy.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:14] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4111_baguettesureau.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:14] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4112_baguettelestrange.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4112_baguettelestrange.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:14] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/MISSING_ICON_ITEM_4113_baguettepotter.png
    java.io.FileNotFoundException: minecraft:textures/items/MISSING_ICON_ITEM_4113_baguettepotter.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:14] [Client thread/INFO]: Created: 512x256 textures/items-atlas
    [11:56:14] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.png
    java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_165_chaudron.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.7.0_67]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]
    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(GradleStartCommon.java:78) [start/:?]
    at GradleStart.main(GradleStart.java:45) [start/:?]
    [11:56:14] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
    [11:56:14] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:14] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
    [11:56:15] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
    [11:56:15] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:15] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:15] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
    [11:56:15] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
    [11:56:15] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    [11:56:15] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
    [11:56:15] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
    [11:56:15] [Sound Library Loader/INFO]: Sound engine started
    [11:56:44] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
    [11:56:44] [Server thread/INFO]: Generating keypair
    [11:56:46] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
    [11:56:47] [Server thread/INFO] [FML]: Applying holder lookups
    [11:56:47] [Server thread/INFO] [FML]: Holder lookups applied
    [11:56:47] [Server thread/INFO] [FML]: Loading dimension 0 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@94aa195)
    [11:56:47] [Server thread/INFO] [FML]: Loading dimension 1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@94aa195)
    [11:56:47] [Server thread/INFO] [FML]: Loading dimension -1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@94aa195)
    [11:56:48] [Server thread/INFO]: Preparing start region for level 0
    [11:56:49] [Server thread/INFO]: Preparing spawn area: 9%
    [11:56:50] [Server thread/INFO]: Preparing spawn area: 88%
    [11:56:51] [Server thread/INFO]: Changing view distance to 2, from 10
    [11:56:52] [Netty Client IO #0/INFO] [FML]: Server protocol version 1
    [11:56:52] [Netty IO #1/INFO] [FML]: Client protocol version 1
    [11:56:52] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : mcp@9.05,FML@7.10.85.1230,modharrypotter@1.0.0,Forge@10.13.2.1230
    [11:56:52] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
    [11:56:52] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
    [11:56:52] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
    [11:56:52] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
    [11:56:52] [Server thread/INFO]: Player500[local:E:df899457] logged in with entity id 108 at (-133.79541600283653, 4.0, 1356.6842936222192)
    [11:56:52] [Server thread/INFO]: Player500 a rejoint la partie
    [11:56:55] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 4417ms behind, skipping 88 tick(s)
    [11:56:56] [Server thread/INFO]: Saving and pausing game…
    [11:56:57] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld
    [11:56:57] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether
    [11:56:57] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End
    [11:57:06] [Server thread/ERROR] [FML]: SimpleChannelHandlerWrapper exception
    java.lang.NullPointerException
    at com.harrypotter.sosoh.proxy.PaquetHandler$Handler.onMessage(PaquetHandler.java:49) ~[PaquetHandler$Handler.class:?]
    at com.harrypotter.sosoh.proxy.PaquetHandler$Handler.onMessage(PaquetHandler.java:1) ~[PaquetHandler$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:?]
    [11:57:06] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel HarryPotterMod
    java.lang.NullPointerException
    at com.harrypotter.sosoh.proxy.PaquetHandler$Handler.onMessage(PaquetHandler.java:49) ~[PaquetHandler$Handler.class:?]
    at com.harrypotter.sosoh.proxy.PaquetHandler$Handler.onMessage(PaquetHandler.java:1) ~[PaquetHandler$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:?]
    [11:57:06] [Server thread/INFO]: Player500 lost connection: TextComponent{text='A fatal error has occured, this connection is terminated', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}
    [11:57:06] [Server thread/INFO]: Player500 a quitté la partie
    [11:57:06] [Server thread/INFO]: Stopping singleplayer server as player logged out
    [11:57:07] [Server thread/INFO]: Stopping server
    

    :::

    Mon code:

    package com.harrypotter.sosoh.proxy;
    
    import net.minecraft.inventory.Container;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.ChatComponentText;
    
    import com.harrypotter.sosoh.common.ModHarryPotter;
    import com.harrypotter.sosoh.common.blocks.TileEntityChaudron;
    import com.harrypotter.sosoh.common.gui.container.ContainerChaudron;
    
    import io.netty.buffer.ByteBuf;
    import cpw.mods.fml.common.network.ByteBufUtils;
    import cpw.mods.fml.common.network.simpleimpl.IMessage;
    import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
    import cpw.mods.fml.common.network.simpleimpl.MessageContext;
    
    public class PaquetHandler implements IMessage {
    
        private String text;
    
        public PaquetHandler() { }
    
        public PaquetHandler(String text) {
            this.text = text;
        }
    
        @Override
        public void fromBytes(ByteBuf buf) {
            text = ByteBufUtils.readUTF8String(buf); // this class is very useful in general for writing more complex objects
        }
    
        @Override
        public void toBytes(ByteBuf buf) {
            ByteBufUtils.writeUTF8String(buf, text);
        }
    
        public static class Handler implements IMessageHandler <paquethandler, imessage="">{
    
            @Override
            public IMessage onMessage(PaquetHandler message, MessageContext ctx) {
    
            if(message.text.equals("p")){
    
            Container c = ctx.getServerHandler().playerEntity.openContainer;
            if(c instanceof ContainerChaudron){
              TileEntityChaudron tile= ((ContainerChaudron)c).getTile();
    
               if(tile.getStackInSlot(1).getItem() == ModHarryPotter.itemBaguette1){
            System.out.println(String.format("test"));
            ctx.getServerHandler().playerEntity.addChatMessage(new ChatComponentText("Recette Connue"));
                }
                else
                {
                ctx.getServerHandler().playerEntity.addChatMessage(new ChatComponentText("Recette Inconnue"));
                }
            }
            }
                return null;
            }
        }
    ```</paquethandler,>

  • Administrateurs

    Remplace

               if(tile.getStackInSlot(1).getItem() == ModHarryPotter.itemBaguette1){
    

    par :

               if(tile.getStackInSlot(1) != null && tile.getStackInSlot(1).getItem() == ModHarryPotter.itemBaguette1){
    


  • Ok merci