• S'inscrire
    • Se connecter
    • Recherche
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes

    Résolu Client crash en multi.

    1.7.x
    1.7.10
    2
    6
    1034
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • Gabs
      Gabs dernière édition par

      Bonsoir,
      Alors j’ai créer une touche qui permet de jouer un son quand on appuie dessus, En solo cela marche très bien mais en multijoueur j’ai un crash:

      java.lang.NullPointerException: Unexpected error
      at com.AltisMine.mod.ClientProxy.keyTestTyped(ClientProxy.java:90)
      at com.AltisMine.mod.ClientProxy.onEvent(ClientProxy.java:82)
      at cpw.mods.fml.common.eventhandler.ASMEventHandler_1_ClientProxy_onEvent_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.func_71407_l(Minecraft.java:1873)
      at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973)
      at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898)
      at net.minecraft.client.main.Main.main(SourceFile:148)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
      at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

      le problème vient de ma class ClientProxy a la ligne 90 et 82.

      Ligne 90:

      World world = server.worldServers[0];
      

      Ligne 82:

      keyTestTyped();
      

      Merci d’avance.

      1 réponse Dernière réponse Répondre Citer 0
      • robin4002
        robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

        Utilises FMLClientHandler.instance().getClientWorld() pour avoir le monde client pour jouer un son lors d’un appuie sur une touche.

        1 réponse Dernière réponse Répondre Citer 0
        • Gabs
          Gabs dernière édition par

          D’accord j’essaye ça pour info c’est getWorldClient() 😉

          1 réponse Dernière réponse Répondre Citer 0
          • Gabs
            Gabs dernière édition par

            Rien, aucun son

            1 réponse Dernière réponse Répondre Citer 0
            • robin4002
              robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

              http://www.minecraftforgefrance.fr/showthread.php?tid=2341&page=2&highlight=getSoundHandler

              1 réponse Dernière réponse Répondre Citer 0
              • Gabs
                Gabs dernière édition par

                Merci 🙂

                1 réponse Dernière réponse Répondre Citer 0
                • 1 / 1
                • Premier message
                  Dernier message
                Design by Woryk
                Contact / Mentions Légales

                MINECRAFT FORGE FRANCE © 2018

                Powered by NodeBB