Résolu Encore problème onUpdate
-
Tu ne dois pas avoir de variables statiques dans ton paquet. Et pourquoi invoquer pleins de constructeurs s’ils ne sont pas tous utilisés ?
-
@‘SCAREX’:
Tu ne dois pas avoir de variables statiques dans ton paquet. Et pourquoi invoquer pleins de constructeurs s’ils ne sont pas tous utilisés ?
Pas sa mon problème, c’est que j’ai un problème avec le !world.remote et le ClientProxy.keybind … j’ai un conflit client / serveur.
Du coup on m’a dis de faire un packet pour le keybindMais je dois mettre quoi dans se packet ? juste le ClientProxy.key… dans la fonction onmessagage ?
-
@‘floriangabet’:
@‘SCAREX’:
Tu ne dois pas avoir de variables statiques dans ton paquet. Et pourquoi invoquer pleins de constructeurs s’ils ne sont pas tous utilisés ?
Pas sa mon problème, c’est que j’ai un problème avec le !world.remote et le ClientProxy.keybind … j’ai un conflit client / serveur.
Du coup on m’a dis de faire un packet pour le keybindMais je dois mettre quoi dans se packet ? juste le ClientProxy.key… dans la fonction onmessagage ?
C’est à dire ? tu essaies de faire quoi ?
-
@‘floriangabet’:
@‘SCAREX’:
Tu ne dois pas avoir de variables statiques dans ton paquet. Et pourquoi invoquer pleins de constructeurs s’ils ne sont pas tous utilisés ?
Pas sa mon problème, c’est que j’ai un problème avec le !world.remote et le ClientProxy.keybind … j’ai un conflit client / serveur.
Du coup on m’a dis de faire un packet pour le keybindMais je dois mettre quoi dans se packet ? juste le ClientProxy.key… dans la fonction onmessagage ?
Il y a plusieurs problèmes :
D’abord, dans ton packet, la variable “i” est static or elle ne doit pas l’être.
Ensuite dans la class de ton item, la ou tu vérifie sur quelle touche on click pour ensuite envoyer une flèche : il faut utiliser des “else if” au lieux de “if” car sinon, si plusieurs conditions sont validés, alors ça invoque plusieurs flèches. De plus, il ne faut pas mettre “&& !world.isRemote” car tu vérifie les touches coté client. (au passage, il manque quelques vérifications de timer) -
@‘LeBossMax2’:
@‘floriangabet’:
@‘SCAREX’:
Tu ne dois pas avoir de variables statiques dans ton paquet. Et pourquoi invoquer pleins de constructeurs s’ils ne sont pas tous utilisés ?
Pas sa mon problème, c’est que j’ai un problème avec le !world.remote et le ClientProxy.keybind … j’ai un conflit client / serveur.
Du coup on m’a dis de faire un packet pour le keybindMais je dois mettre quoi dans se packet ? juste le ClientProxy.key… dans la fonction onmessagage ?
Il y a plusieurs problèmes :
D’abord, dans ton packet, la variable “i” est static or elle ne doit pas l’être.
Ensuite dans la class de ton item, la ou tu vérifie sur quelle touche on click pour ensuite envoyer une flèche : il faut utiliser des “else if” au lieux de “if” car sinon, si plusieurs conditions sont validés, alors ça invoque plusieurs flèches. De plus, il ne faut pas mettre “&& !world.isRemote” car tu vérifie les touches coté client. (au passage, il manque quelques vérifications de timer)Salut,
Alors pour le i ok pour les else if c’est fait et si je met pas les && !world.isRemote sa me lance deux flèches une normale et une en feu (pour le sort de feu) et cela a chaque sort sauf pour les 5 flèches car c’est pas avec l’action d’un touche donc pas côté client . -
Oups, j’avais pas pensais à ça… Je pence que le plus simple ce serais d’envoyer aussi la flèche normal et les 5 flèches avec le packet des flèches en mettant bien des “world.isRemote” pour que le serveur ne s’envoie pas des packet à lui même.
Edit : tu devrais aussi gérer les timer coté serveur dans le “onMessage” du packet.
-
Je crois que tu n’as toujours pas compris c’est sûrement de ma faute on me dit de pas assez détailler et ils ont raison alors je vais essayer de t’expliquer.
En gros se que je cherche à faire tu as du comprendre ça au moins x):
- Différente flèches sur le même arc activable avec différente touches avec un timer pour ne pas spam les sorts.
Mon problème:
- En gros le soucis c’est que vus que la flèche doit êtres lancé côté serveur et que j’active mes sorts avec des touches côté client tu comprends bien que serveur et client n’est pas trop compatible…
- Du coup moi se que je veux c’est donc lancé la flèche côté serveur et en même temps pouvoir activé le sort avec une touche (on m’a dit que c’était possible avec un packet, mais je vois pas du tout quoi mettre dedans appart juste le Clientproxy.ketbind… dans la fonction onMesssage j’ai pas essayer perso) .
Quand tu dis: tu devrais aussi gérer les timer coté serveur dans le “onMessage” du packet.
Tu parle des temps de recharge de mes sort logiquement si oui je peux faire comment pour les timers avec des int timer ? ensuite if (timer > 0) timer–; un truc du genre ?
-
Est-ce que ce ne serai pas plus simple de modifier le metadata lorsqu’on appuie sur une touche et ensuite récupérer le metadata afin de savoir quelle sorte de flèche tirer ?
-
Il faudrait aussi un packet pour la changer.
Envoyé via mobile
-
@‘SCAREX’:
Est-ce que ce ne serai pas plus simple de modifier le metadata lorsqu’on appuie sur une touche et ensuite récupérer le metadata afin de savoir quelle sorte de flèche tirer ?
Euhhhhhh c’est à dire ?
Je sais pas c’est quoi le métadata ^^ -
Le metadata est un nombre (par défaut à 0) qui est présent sur tous les items et les blocks ce qui permet de créer plusieurs variantes d’un item ou d’un bloc, exemples : la laine n’a qu’un seul bloc avec plusieurs métadatas, les items qui s’usent utilisent les métadatas, les blocs qui ont une orientation ont des métadatas différents, etc.
-
@‘SCAREX’:
Le metadata est un nombre (par défaut à 0) qui est présent sur tous les items et les blocks ce qui permet de créer plusieurs variantes d’un item ou d’un bloc, exemples : la laine n’a qu’un seul bloc avec plusieurs métadatas, les items qui s’usent utilisent les métadatas, les blocs qui ont une orientation ont des métadatas différents, etc.
Ahhh ok je vois .
Mais comment l’utilisé ?
Si vous avez des tutos ou quoi je suis preneur car la ^^ . -
stack.metadata
-
stack.set/getDamage.
Avec un outil ce n’est pas bon car le metadata est déjà utilisé pour l’usure de l’item. -
En revanche tu peux toujours utiliser les nbt
-
Donc si j’ai bien compris il faut que je changer les metadata de la touche ? c’est bien ça ?
Mais je vois pas du tout comment faire en fait … -
Nan, il faut changer les tags nbt de l’item lorsque tu appuies sur une touche
-
@‘SCAREX’:
Nan, il faut changer les tags nbt de l’item lorsque tu appuies sur une touche
Ah je vois le truc je crois.
J’ai essayer ça, me taper pas s’il vous plait mais je crois que je suis pas bien loin x):
Proxy:
@SubscribeEvent public void onEvent2(KeyInputEvent event) { if(keyBindSortG1.isPressed()) { keyTestTyped2(); } } private void keyTestTyped2() { ItemStack stack = new ItemStack(LegacyMod.FlameBow); NBTTagCompound nbt = new NBTTagCompound(); stack.getTagCompound().setTag("key", nbt); }
FlameBow ( classe de l’arc )
else if (!world.isRemote && stack.getTagCompound().hasKey("key")) { LegacyMod.network.sendToServer(new PacketArrow(f * 2.0F, 3)); System.out.println("flèche en feu"); stack.getTagCompound().setInteger("timer2", 0); }
Forcément ça crash ça vient du private void keyTestTyped2() à mon avis.
-
1. tu créé un item stack de null part
2. sans le rapport de crash on ne peut pas te dire d’où vient le souci. -
Crash:
[00:27:52] [main/INFO] [GradleStart]: username: floriangabet [00:27:52] [main/INFO] [GradleStart]: Extra: [] [00:27:52] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [00:27:52] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [00:27:52] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [00:27:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [00:27:52] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [00:27:53] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading [00:27:53] [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 [00:27:53] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [00:27:53] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin [00:27:53] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [00:27:53] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [00:27:53] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [00:27:53] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker [00:27:53] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [00:27:54] [main/INFO]: Setting user: floriangabet [00:27:54] [Client thread/INFO]: LWJGL Version: 2.9.1 [00:27:55] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [00:27:55] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized [00:27:55] [Client thread/INFO] [FML]: Replaced 183 ore recipies [00:27:55] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [00:27:55] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods [00:27:56] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc [00:27:57] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [00:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT [00:27:57] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER [00:27:57] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [00:27:57] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [00:27:57] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [00:27:57] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [00:27:57] [Client thread/INFO] [FML]: Applying holder lookups [00:27:57] [Client thread/INFO] [FML]: Holder lookups applied [00:27:57] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:27:57] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [00:27:57] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [00:27:57] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:27:58] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [00:27:58] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:27:58] [Sound Library Loader/INFO]: Sound engine started [00:28:00] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [00:28:00] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/.png java.io.FileNotFoundException: minecraft:textures/items/.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/:?] [00:28:00] [Client thread/INFO]: Created: 512x256 textures/items-atlas [00:28:00] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [00:28:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip [00:28:02] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas [00:28:02] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/.png java.io.FileNotFoundException: minecraft:textures/items/.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/:?] [00:28:03] [Client thread/INFO]: Created: 512x256 textures/items-atlas [00:28:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:28:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down… [00:28:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com [00:28:03] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:28:03] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:28:03] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem… [00:28:03] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL [00:28:03] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:28:03] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized. [00:28:03] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: [00:28:03] [Sound Library Loader/INFO]: Sound engine started [00:28:05] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10 [00:28:05] [Server thread/INFO]: Generating keypair [00:28:06] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance [00:28:06] [Server thread/INFO] [FML]: Applying holder lookups [00:28:06] [Server thread/INFO] [FML]: Holder lookups applied [00:28:06] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1337629) [00:28:06] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1337629) [00:28:06] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1337629) [00:28:06] [Server thread/INFO]: Preparing start region for level 0 [00:28:06] [Server thread/INFO]: Changing view distance to 8, from 10 [00:28:07] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [00:28:07] [Netty IO #1/INFO] [FML]: Client protocol version 1 [00:28:07] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05 [00:28:07] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [00:28:07] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [00:28:07] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [00:28:07] [Server thread/INFO]: floriangabet[local:E:d5427047] logged in with entity id 351 at (-134.3987113131543, 83.5862816420882, -5.468148358042519) [00:28:07] [Server thread/INFO]: floriangabet a rejoint la partie [00:28:07] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [00:28:08] [Client thread/ERROR] [FML]: Exception caught during firing event cpw.mods.fml.common.gameevent.InputEvent$KeyInputEvent@2c3aa0: java.lang.NullPointerException at net.legacymod.proxy.ClientProxy.keyTestTyped2(ClientProxy.java:91) ~[ClientProxy.class:?] at net.legacymod.proxy.ClientProxy.onEvent2(ClientProxy.java:83) ~[ClientProxy.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_ClientProxy_onEvent2_KeyInputEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:540) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1953) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [00:28:08] [Client thread/ERROR] [FML]: Index: 1 Listeners: [00:28:08] [Client thread/ERROR] [FML]: 0: NORMAL [00:28:08] [Client thread/ERROR] [FML]: 1: ASM: net.legacymod.proxy.ClientProxy@38b10a onEvent2(Lcpw/mods/fml/common/gameevent/InputEvent$KeyInputEvent;)V [00:28:08] [Client thread/ERROR] [FML]: 2: ASM: net.legacymod.proxy.ClientProxy@38b10a onEvent(Lcpw/mods/fml/common/gameevent/InputEvent$KeyInputEvent;)V [00:28:08] [Server thread/INFO]: Stopping server [00:28:08] [Server thread/INFO]: Saving players [00:28:08] [Server thread/INFO]: Saving worlds [00:28:08] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [00:28:08] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [00:28:08] [Server thread/INFO]: Saving chunks for level 'New World'/The End [00:28:09] [Server thread/INFO] [FML]: Unloading dimension 0 [00:28:09] [Server thread/INFO] [FML]: Unloading dimension -1 [00:28:09] [Server thread/INFO] [FML]: Unloading dimension 1 [00:28:09] [Server thread/INFO] [FML]: Applying holder lookups [00:28:09] [Server thread/INFO] [FML]: Holder lookups applied [00:28:09] [Client thread/FATAL]: Unreported exception thrown! java.lang.NullPointerException at net.legacymod.proxy.ClientProxy.keyTestTyped2(ClientProxy.java:91) ~[ClientProxy.class:?] at net.legacymod.proxy.ClientProxy.onEvent2(ClientProxy.java:83) ~[ClientProxy.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_ClientProxy_onEvent2_KeyInputEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:540) ~[FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1953) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [00:28:09] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // You're mean. Time: 25/07/16 00:28 Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.legacymod.proxy.ClientProxy.keyTestTyped2(ClientProxy.java:91) at net.legacymod.proxy.ClientProxy.onEvent2(ClientProxy.java:83) at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_ClientProxy_onEvent2_KeyInputEvent.invoke(.dynamic) at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) at cpw.mods.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:540) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1953) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.legacymod.proxy.ClientProxy.keyTestTyped2(ClientProxy.java:91) at net.legacymod.proxy.ClientProxy.onEvent2(ClientProxy.java:83) at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_ClientProxy_onEvent2_KeyInputEvent.invoke(.dynamic) at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) at cpw.mods.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:540) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['floriangabet'/351, l='MpServer', x=-134,40, y=85,21, z=-5,47]] Chunk stats: MultiplayerChunkCache: 140, 140 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (-148,64,252), Chunk: (at 12,4,12 in -10,15; contains blocks -160,0,240 to -145,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 2713170 game time, 1 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 108 total; [EntitySheep['Mouton'/256, l='MpServer', x=-88,84, y=64,00, z=65,22], EntitySlime['Slime'/516, l='MpServer', x=-190,78, y=36,33, z=-44,22], EntityCow['Vache'/261, l='MpServer', x=-68,35, y=66,00, z=57,78], EntityPig['Cochon'/262, l='MpServer', x=-71,53, y=63,00, z=64,97], EntityPig['Cochon'/519, l='MpServer', x=-78,47, y=75,69, z=36,63], EntityChicken['Poule'/520, l='MpServer', x=-190,53, y=62,45, z=-23,56], EntityBat['Chauve-souris'/524, l='MpServer', x=-158,90, y=36,39, z=-60,81], EntityCow['Vache'/269, l='MpServer', x=-63,88, y=64,00, z=61,88], EntityCow['Vache'/526, l='MpServer', x=-76,19, y=89,19, z=0,94], EntityCreeper['Creeper'/527, l='MpServer', x=-125,50, y=22,19, z=-53,50], EntityZombie['Zombie'/528, l='MpServer', x=-113,91, y=32,19, z=-57,63], EntityZombie['Zombie'/530, l='MpServer', x=-153,75, y=16,19, z=-72,09], EntityItem['item.tile.dirt.default'/352, l='MpServer', x=-142,13, y=77,13, z=-3,34], EntityItem['item.tile.dirt.default'/353, l='MpServer', x=-143,31, y=78,13, z=-2,13], EntityItem['item.tile.dirt.default'/354, l='MpServer', x=-141,66, y=76,13, z=-1,19], EntityItem['item.item.string'/355, l='MpServer', x=-141,13, y=77,13, z=-3,06], EntityItem['item.item.spiderEye'/356, l='MpServer', x=-141,63, y=77,13, z=-3,88], EntityXPOrb['Orbe d'expérience'/357, l='MpServer', x=-142,56, y=77,93, z=0,75], EntityXPOrb['Orbe d'expérience'/358, l='MpServer', x=-141,20, y=78,25, z=-6,47], EntityXPOrb['Orbe d'expérience'/359, l='MpServer', x=-135,35, y=78,95, z=-4,05], EntityXPOrb['Orbe d'expérience'/360, l='MpServer', x=-135,31, y=78,25, z=-8,23], EntityItem['item.tile.gravel'/361, l='MpServer', x=-133,38, y=77,13, z=-5,88], EntityItem['item.tile.gravel'/362, l='MpServer', x=-132,66, y=77,13, z=-4,19], EntityItem['item.tile.gravel'/363, l='MpServer', x=-135,00, y=78,13, z=-5,34], EntityClientPlayerMP['floriangabet'/351, l='MpServer', x=-134,40, y=85,21, z=-5,47], EntityItem['item.item.spiderEye'/365, l='MpServer', x=-161,20, y=75,64, z=-4,13], EntityItem['item.item.spiderEye'/366, l='MpServer', x=-149,34, y=77,21, z=-5,75], EntityItem['item.item.leather'/367, l='MpServer', x=-146,81, y=77,06, z=-7,75], EntityItem['item.item.beefCooked'/368, l='MpServer', x=-148,06, y=77,26, z=-7,78], EntityXPOrb['Orbe d'expérience'/369, l='MpServer', x=-147,19, y=76,75, z=-11,41], EntityMooshroom['Champimeuh'/370, l='MpServer', x=-151,81, y=76,00, z=-9,25], EntityItem['item.item.string'/371, l='MpServer', x=-129,41, y=77,11, z=-30,22], EntityXPOrb['Orbe d'expérience'/373, l='MpServer', x=-144,27, y=74,75, z=0,38], EntityArrow['Flèche'/374, l='MpServer', x=-131,41, y=73,05, z=6,37], EntityItem['item.item.string'/380, l='MpServer', x=-147,53, y=76,49, z=-26,44], EntityXPOrb['Orbe d'expérience'/381, l='MpServer', x=-151,88, y=75,75, z=-28,63], EntityXPOrb['Orbe d'expérience'/382, l='MpServer', x=-148,25, y=75,75, z=-28,25], EntityXPOrb['Orbe d'expérience'/383, l='MpServer', x=-150,78, y=75,75, z=-28,78], EntityArrow['Flèche'/384, l='MpServer', x=-142,58, y=69,05, z=-26,37], EntityMooshroom['Champimeuh'/385, l='MpServer', x=-125,50, y=77,00, z=-29,50], EntityItem['item.item.leather'/386, l='MpServer', x=-125,88, y=77,25, z=-25,13], EntityItem['item.item.beefCooked'/387, l='MpServer', x=-125,88, y=77,56, z=-25,47], EntityXPOrb['Orbe d'expérience'/388, l='MpServer', x=-125,75, y=77,75, z=-25,75], EntityXPOrb['Orbe d'expérience'/389, l='MpServer', x=-125,09, y=79,75, z=-25,59], EntityXPOrb['Orbe d'expérience'/396, l='MpServer', x=-163,84, y=75,75, z=-9,00], EntityCow['Vache'/142, l='MpServer', x=-212,28, y=70,00, z=48,97], EntityXPOrb['Orbe d'expérience'/399, l='MpServer', x=-164,78, y=75,75, z=-10,41], EntityXPOrb['Orbe d'expérience'/401, l='MpServer', x=-160,25, y=75,75, z=-2,81], EntitySkeleton['Squelette'/406, l='MpServer', x=-172,16, y=42,00, z=-30,69], EntityItem['item.item.leather'/407, l='MpServer', x=-124,81, y=74,80, z=-35,56], EntityItem['item.item.beefCooked'/408, l='MpServer', x=-125,59, y=75,03, z=-36,66], EntityItem['item.item.beefCooked'/409, l='MpServer', x=-125,78, y=75,11, z=-34,31], EntityXPOrb['Orbe d'expérience'/410, l='MpServer', x=-125,19, y=74,75, z=-34,72], EntityCreeper['Creeper'/415, l='MpServer', x=-165,50, y=30,00, z=-81,50], EntitySkeleton['Squelette'/416, l='MpServer', x=-162,37, y=38,00, z=-84,79], EntitySheep['Mouton'/417, l='MpServer', x=-160,66, y=61,20, z=-84,81], EntityCreeper['Creeper'/422, l='MpServer', x=-173,28, y=27,00, z=-76,69], EntityCreeper['Creeper'/423, l='MpServer', x=-174,50, y=27,00, z=-76,50], EntityCreeper['Creeper'/424, l='MpServer', x=-173,53, y=27,00, z=-77,56], EntitySquid['Poulpe'/425, l='MpServer', x=-186,50, y=62,39, z=43,96], EntitySquid['Poulpe'/426, l='MpServer', x=-185,71, y=60,23, z=34,75], EntitySquid['Poulpe'/427, l='MpServer', x=-183,59, y=61,23, z=36,45], EntitySheep['Mouton'/433, l='MpServer', x=-94,47, y=87,19, z=-48,31], EntitySheep['Mouton'/434, l='MpServer', x=-80,84, y=102,19, z=-53,84], EntitySheep['Mouton'/435, l='MpServer', x=-191,91, y=69,19, z=8,47], EntitySquid['Poulpe'/437, l='MpServer', x=-181,72, y=60,02, z=27,04], EntitySquid['Poulpe'/438, l='MpServer', x=-186,66, y=61,89, z=22,61], EntitySquid['Poulpe'/439, l='MpServer', x=-184,23, y=60,38, z=29,32], EntitySquid['Poulpe'/440, l='MpServer', x=-183,00, y=60,26, z=27,65], EntitySquid['Poulpe'/441, l='MpServer', x=-190,21, y=62,32, z=32,10], EntitySquid['Poulpe'/442, l='MpServer', x=-175,41, y=58,98, z=29,38], EntityChicken['Poule'/190, l='MpServer', x=-174,56, y=62,35, z=49,44], EntityCreeper['Creeper'/454, l='MpServer', x=-90,72, y=27,19, z=43,72], EntityCreeper['Creeper'/455, l='MpServer', x=-91,16, y=28,00, z=47,91], EntityBat['Chauve-souris'/457, l='MpServer', x=-127,45, y=57,90, z=-77,62], EntitySheep['Mouton'/458, l='MpServer', x=-131,91, y=80,19, z=-75,06], EntityCow['Vache'/459, l='MpServer', x=-205,25, y=63,19, z=-59,47], EntityBat['Chauve-souris'/460, l='MpServer', x=-202,46, y=22,95, z=38,83], EntitySkeleton['Squelette'/463, l='MpServer', x=-168,50, y=42,19, z=-34,50], EntitySheep['Mouton'/464, l='MpServer', x=-167,47, y=65,23, z=-37,44], EntityChicken['Poule'/465, l='MpServer', x=-166,56, y=66,89, z=-39,56], EntityPig['Cochon'/210, l='MpServer', x=-138,06, y=63,00, z=62,06], EntitySheep['Mouton'/211, l='MpServer', x=-140,31, y=63,00, z=70,16], EntityZombie['Zombie'/474, l='MpServer', x=-197,50, y=31,19, z=-82,50], EntityZombie['Zombie'/475, l='MpServer', x=-198,50, y=31,19, z=-83,50], EntityZombie['Zombie'/476, l='MpServer', x=-195,50, y=31,19, z=-80,84], EntityZombie['Zombie'/477, l='MpServer', x=-194,31, y=31,19, z=-80,84], EntityBat['Chauve-souris'/479, l='MpServer', x=-200,97, y=22,32, z=27,70], EntitySheep['Mouton'/223, l='MpServer', x=-113,88, y=66,00, z=49,81], EntityBat['Chauve-souris'/480, l='MpServer', x=-200,89, y=22,08, z=31,23], EntitySquid['Poulpe'/481, l='MpServer', x=-192,27, y=61,37, z=28,60], EntitySkeleton['Squelette'/484, l='MpServer', x=-56,50, y=28,19, z=8,50], EntitySlime['Slime'/230, l='MpServer', x=-97,69, y=31,00, z=51,69], EntityBat['Chauve-souris'/494, l='MpServer', x=-196,25, y=32,10, z=-69,25], EntitySpider['Araignée'/495, l='MpServer', x=-195,81, y=32,82, z=-78,94], EntitySheep['Mouton'/498, l='MpServer', x=-145,88, y=62,00, z=47,91], EntityChicken['Poule'/499, l='MpServer', x=-158,25, y=62,89, z=36,47], EntitySheep['Mouton'/500, l='MpServer', x=-160,81, y=61,19, z=38,56], EntitySquid['Poulpe'/501, l='MpServer', x=-174,26, y=57,93, z=43,95], EntitySquid['Poulpe'/502, l='MpServer', x=-174,56, y=57,27, z=35,83], EntityZombie['Zombie'/249, l='MpServer', x=-85,50, y=29,00, z=49,50], EntityCreeper['Creeper'/250, l='MpServer', x=-89,34, y=29,00, z=48,31], EntityCreeper['Creeper'/251, l='MpServer', x=-91,27, y=29,00, z=52,02], EntityCreeper['Creeper'/252, l='MpServer', x=-92,52, y=29,00, z=49,82], EntityChicken['Poule'/509, l='MpServer', x=-196,53, y=62,89, z=-41,53], EntityCreeper['Creeper'/253, l='MpServer', x=-93,69, y=29,00, z=50,53], EntitySheep['Mouton'/254, l='MpServer', x=-88,97, y=64,00, z=59,94], EntitySheep['Mouton'/255, l='MpServer', x=-95,47, y=67,00, z=55,34]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:980) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 859790088 bytes (819 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available lc{1.0} [lc] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 368.39, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [[1.10] Firewolf v1.36.zip] Current Language: Français (France) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) [00:28:09] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\.\crash-reports\crash-2016-07-25_00.28.09-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Faut que je fasse un truc comme ça ?:
NBTTagCompound nbt = (NBTTagCompound) stack.getTagCompound().getTag(“key”);