MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    Extended Entity Props. qui ne se savent pas

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    45 Messages 3 Publieurs 9.2k Vues 1 Watching
    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.
    • SCAREXS Hors-ligne
      SCAREX
      dernière édition par

      @‘sosoh’:

      J’ai mis dans la fonction store de mon common proxy, ça marche. Quelqu’un a une idée ?

      Le problème vient de là:

      ​
      @Override
      
      public void saveNBTData(NBTTagCompound compound)
      {
      
      NBTTagCompound properties = new NBTTagCompound();
      properties.setDouble("Mana", this.mana);
      properties.setDouble("MaxMana", this.maxMana);
      properties.setString("spellRight", this.spellRight);
      properties.setString("spellLeft", this.spellLeft);
      properties.setInteger("spellsListSize", this.spellsList.size());
      if(this.spellsList != null){
      for(String spell : this.spellsList)
      {
      properties.setString("spellsList", spell);
      }
      }
      compound.setTag(EXT_PROP_NAME, properties);
      }
      

      Ta boucle for supprime l’ancienne valeur : il faut utiliser un NBTTagList.

      Site web contenant mes scripts : http://SCAREXgaming.github.io

      Pas de demandes de support par MP ni par skype SVP.
      Je n'accepte sur skype que l…

      1 réponse Dernière réponse Répondre Citer 0
      • sosohS Hors-ligne
        sosoh
        dernière édition par

        Tu peux m’expliquer comment car je ne maîtrise pas tout à fait?

        Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

        1 réponse Dernière réponse Répondre Citer 0
        • SCAREXS Hors-ligne
          SCAREX
          dernière édition par

          @‘sosoh’:

          Tu peux m’expliquer comment car je ne maîtrise pas tout à fait?

          Regarde dans le code tu TileEntity coffre car j’ai jamais utilisé ce NBTTag mais je sais qu’il existe.

          Site web contenant mes scripts : http://SCAREXgaming.github.io

          Pas de demandes de support par MP ni par skype SVP.
          Je n'accepte sur skype que l…

          1 réponse Dernière réponse Répondre Citer 0
          • sosohS Hors-ligne
            sosoh
            dernière édition par

            Mais je mets un NBTTagList pour juste l’array ou pour toutes mes props ?

            Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

            1 réponse Dernière réponse Répondre Citer 0
            • SCAREXS Hors-ligne
              SCAREX
              dernière édition par

              @‘sosoh’:

              Mais je mets un NBTTagList pour juste l’array ou pour toutes mes props ?

              juste pour ton array spellList.

              Site web contenant mes scripts : http://SCAREXgaming.github.io

              Pas de demandes de support par MP ni par skype SVP.
              Je n'accepte sur skype que l…

              1 réponse Dernière réponse Répondre Citer 0
              • sosohS Hors-ligne
                sosoh
                dernière édition par

                J’ai fait ca, mais ca ne marche pas:

                ​@Override
                
                public void saveNBTData(NBTTagCompound compound) 
                    {
                
                        NBTTagCompound properties = new NBTTagCompound();
                        NBTTagList nbtlist = new NBTTagList();
                        properties.setDouble("Mana", this.mana);
                        properties.setDouble("MaxMana", this.maxMana);
                        properties.setString("spellRight", this.spellRight);
                        properties.setString("spellLeft", this.spellLeft);
                        properties.setInteger("spellsListSize", this.spellsList.size());
                        nbtlist.appendTag(properties);
                        if(this.spellsList != null){
                            for(String spell : this.spellsList)
                            {
                            NBTTagCompound nbttag = new NBTTagCompound();
                            nbttag.setString("spellsList", spell);
                                nbtlist.appendTag(nbttag);
                            }
                        }
                        compound.setTag(EXT_PROP_NAME, nbtlist);
                    }
                
                @Override
                public void loadNBTData(NBTTagCompound compound) 
                {
                NBTTagList nbtlist = (NBTTagList) compound.getTag(EXT_PROP_NAME);
                NBTTagCompound properties = nbtlist.getCompoundTagAt(1);
                this.mana = properties.getDouble("Mana");
                this.maxMana = properties.getDouble("MaxMana");
                this.spellRight = properties.getString("spellRight");
                this.spellLeft = properties.getString("spellLeft");
                int size = properties.getInteger("spellsListSize");
                if(size > 0){
                for(int i = 0; i < size; i++){
                NBTTagCompound nbttag = nbtlist.getCompoundTagAt(i);
                this.spellsList.add(i, nbttag.getString("spellsList"));
                }
                }
                }
                

                Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                1 réponse Dernière réponse Répondre Citer 0
                • SCAREXS Hors-ligne
                  SCAREX
                  dernière édition par

                  @‘sosoh’:

                  J’ai fait ca, mais ca ne marche pas:

                  ​@Override
                  
                  public void saveNBTData(NBTTagCompound compound) 
                      {
                  
                          NBTTagCompound properties = new NBTTagCompound();
                          NBTTagList nbtlist = new NBTTagList();
                          properties.setDouble("Mana", this.mana);
                          properties.setDouble("MaxMana", this.maxMana);
                          properties.setString("spellRight", this.spellRight);
                          properties.setString("spellLeft", this.spellLeft);
                          properties.setInteger("spellsListSize", this.spellsList.size());
                          nbtlist.appendTag(properties);
                          if(this.spellsList != null){
                              for(String spell : this.spellsList)
                              {
                              NBTTagCompound nbttag = new NBTTagCompound();
                              nbttag.setString("spellsList", spell);
                                  nbtlist.appendTag(nbttag);
                              }
                          }
                          compound.setTag(EXT_PROP_NAME, nbtlist);
                      }
                  
                  @Override
                  public void loadNBTData(NBTTagCompound compound) 
                  {
                  NBTTagList nbtlist = (NBTTagList) compound.getTag(EXT_PROP_NAME);
                  NBTTagCompound properties = nbtlist.getCompoundTagAt(1);
                  this.mana = properties.getDouble("Mana");
                  this.maxMana = properties.getDouble("MaxMana");
                  this.spellRight = properties.getString("spellRight");
                  this.spellLeft = properties.getString("spellLeft");
                  int size = properties.getInteger("spellsListSize");
                  if(size > 0){
                  for(int i = 0; i < size; i++){
                  NBTTagCompound nbttag = nbtlist.getCompoundTagAt(i);
                  this.spellsList.add(i, nbttag.getString("spellsList"));
                  }
                  }
                  }
                  

                  regarde comment les NBTTagList fonctionne dans le TileEntityChest

                  Site web contenant mes scripts : http://SCAREXgaming.github.io

                  Pas de demandes de support par MP ni par skype SVP.
                  Je n'accepte sur skype que l…

                  1 réponse Dernière réponse Répondre Citer 0
                  • sosohS Hors-ligne
                    sosoh
                    dernière édition par

                    C’est ce que j’ai fais^^

                    Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                    1 réponse Dernière réponse Répondre Citer 0
                    • SCAREXS Hors-ligne
                      SCAREX
                      dernière édition par

                      @‘sosoh’:

                      C’est ce que j’ai fais^^

                      Regarde mieux alors car je peux pas beaucoup t’aider là-dessus (PS : le NBTTagList doit être créer EN-DEHORS de la boucle for)

                      Site web contenant mes scripts : http://SCAREXgaming.github.io

                      Pas de demandes de support par MP ni par skype SVP.
                      Je n'accepte sur skype que l…

                      1 réponse Dernière réponse Répondre Citer 0
                      • sosohS Hors-ligne
                        sosoh
                        dernière édition par

                        C’est ce que j’ai fait

                        Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                        1 réponse Dernière réponse Répondre Citer 0
                        • SCAREXS Hors-ligne
                          SCAREX
                          dernière édition par

                          @‘sosoh’:

                          C’est ce que j’ai fait

                          Le problème est que tu mets tes variables dans la liste, voici arborescence que tu devrais avoir :
                          -NBTTagCompound (joueur) {
                            -NBTTagCompound (ton extendedentityproperties){
                          -NBTTagCeQueTuVeux Variable 1
                              -NBTTagCeQueTuVeux Variable 2
                              -NBTTagCeQueTuVeux Variable n
                              -NBTTagList {
                               -NBTTagString spell 1
                               -NBTTagString spell 2
                               -NBTTagString spell n
                          }
                          }
                          }

                          Site web contenant mes scripts : http://SCAREXgaming.github.io

                          Pas de demandes de support par MP ni par skype SVP.
                          Je n'accepte sur skype que l…

                          1 réponse Dernière réponse Répondre Citer 0
                          • sosohS Hors-ligne
                            sosoh
                            dernière édition par

                            Faut que je fasses un NBTTagCompound pour chaque variable ? Et les NBTTagCompounds de chaque variable dans mon NBTTagList ?

                            Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                            1 réponse Dernière réponse Répondre Citer 0
                            • SCAREXS Hors-ligne
                              SCAREX
                              dernière édition par

                              @‘sosoh’:

                              Faut que je fasses un NBTTagCompound pour chaque variable ? Et les NBTTagCompounds de chaque variable dans mon NBTTagList ?

                              Un NBTTagCompound est l’équivalent d’un dossier, NBTTagString, NBTTagInt, etc sont des équivalents de fichiers et les NBTTagList sont une sorte de dossier dans lesquels tu peux mettre qu’un seul type de fichiers (ou de dossier).

                              Donc tu créer un NBTTagCompound pour ton entityExtendedProperties dans lequel tu mets tes variables puis tu créer un NBTTagList avec dedans tout tes NBTTagString pour ta liste de String.

                              (je fais le code complet et je te le donnes sinon on va encore y passer plusieurs heures)

                              Site web contenant mes scripts : http://SCAREXgaming.github.io

                              Pas de demandes de support par MP ni par skype SVP.
                              Je n'accepte sur skype que l…

                              1 réponse Dernière réponse Répondre Citer 0
                              • sosohS Hors-ligne
                                sosoh
                                dernière édition par

                                Merci ! 🙂 je crois avoir compris mais avec le code que tu vas me donner je pense que ça ce être plus explicit 🙂 Juste si j’ai bien compris si je veux enregistrer une string je dois la mettre dans une NBTTagString ?

                                Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                                1 réponse Dernière réponse Répondre Citer 0
                                • SCAREXS Hors-ligne
                                  SCAREX
                                  dernière édition par

                                  @‘sosoh’:

                                  Merci ! 🙂 je crois avoir compris mais avec le code que tu vas me donner je pense que ça ce être plus explicit 🙂 Juste si j’ai bien compris si je veux enregistrer une string je dois la mettre dans une NBTTagString ?

                                  Voilà :

                                  
                                  @Override
                                  public void saveNBTData(NBTTagCompound compound) {
                                  NBTTagCompound properties = new NBTTagCompound();
                                  properties.setDouble("Mana", this.mana);
                                  properties.setDouble("MaxMana", this.maxMana);
                                  properties.setString("spellRight", this.spellRight);
                                  properties.setString("spellLeft", this.spellLeft);
                                  
                                  if (this.spellsList != null) {
                                  NBTTagList list = new NBTTagList();
                                  for (String spell : this.spellsList) {
                                  list.appendTag(new NBTTagString(spell));
                                  }
                                  properties.setTag("Spells", list);
                                  }
                                  compound.setTag(EXT_PROP_NAME, properties);
                                  }
                                  
                                  

                                  Pour mettre un String, il y a 2 méthodes :

                                  • Si c’est un NBTTagCompound : tonTagCompound.setString(key, value)
                                  • Si c’est un NBTTagList : tonTagList.appendTag(new NBTTagString(value))

                                  Site web contenant mes scripts : http://SCAREXgaming.github.io

                                  Pas de demandes de support par MP ni par skype SVP.
                                  Je n'accepte sur skype que l…

                                  1 réponse Dernière réponse Répondre Citer 0
                                  • sosohS Hors-ligne
                                    sosoh
                                    dernière édition par

                                    Ok merci et donc pour le load je fais pareil ?

                                    Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                                    1 réponse Dernière réponse Répondre Citer 0
                                    • SCAREXS Hors-ligne
                                      SCAREX
                                      dernière édition par

                                      @‘sosoh’:

                                      Ok merci et donc pour le load je fais pareil ?

                                      Même chose mais dans l’autre sens, je peux pas t’aider : je suis pressé mais regarde dans le TileEntityChest, ça devrait t’aider.

                                      Site web contenant mes scripts : http://SCAREXgaming.github.io

                                      Pas de demandes de support par MP ni par skype SVP.
                                      Je n'accepte sur skype que l…

                                      1 réponse Dernière réponse Répondre Citer 0
                                      • sosohS Hors-ligne
                                        sosoh
                                        dernière édition par

                                        J’ai fait ca, mais ça ne marche pas:

                                        ​@Override
                                        
                                        public void loadNBTData(NBTTagCompound compound) 
                                        {
                                        NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME);
                                        this.mana = properties.getDouble("Mana");
                                        this.maxMana = properties.getDouble("MaxMana");
                                        this.spellRight = properties.getString("spellRight");
                                        this.spellLeft = properties.getString("spellLeft");
                                        int size = properties.getInteger("spellsListSize");
                                        NBTTagList list = compound.getTagList("Spells", size);
                                        if(size > 0){
                                        for(int i = 0; i < size; i++){
                                        NBTTagCompound nbttag = list.getCompoundTagAt(i);
                                        this.spellsList.add(i, nbttag.getString("spellsList"));
                                        }
                                        }
                                        }
                                        
                                        [20:03:24] [Server thread/ERROR] [FML]: Failed to load extended properties for ExtHogs.  This is a mod issue.
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.ClassCastException: net.minecraft.nbt.NBTTagList cannot be cast to net.minecraft.nbt.NBTTagCompound
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps.loadNBTData(ExtendedEntityProps.java:83)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.Entity.readFromNBT(Entity.java:1616)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.readPlayerDataFromFile(ServerConfigurationManager.java:271)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:123)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
                                        [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
                                        

                                        La ligne 83: NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME);.

                                        Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • SCAREXS Hors-ligne
                                          SCAREX
                                          dernière édition par

                                          @‘sosoh’:

                                          J’ai fait ca, mais ça ne marche pas:

                                          ​@Override
                                          
                                          public void loadNBTData(NBTTagCompound compound) 
                                          {
                                          NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME);
                                          this.mana = properties.getDouble("Mana");
                                          this.maxMana = properties.getDouble("MaxMana");
                                          this.spellRight = properties.getString("spellRight");
                                          this.spellLeft = properties.getString("spellLeft");
                                          int size = properties.getInteger("spellsListSize");
                                          NBTTagList list = compound.getTagList("Spells", size);
                                          if(size > 0){
                                          for(int i = 0; i < size; i++){
                                          NBTTagCompound nbttag = list.getCompoundTagAt(i);
                                          this.spellsList.add(i, nbttag.getString("spellsList"));
                                          }
                                          }
                                          }
                                          
                                          [20:03:24] [Server thread/ERROR] [FML]: Failed to load extended properties for ExtHogs.  This is a mod issue.
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.ClassCastException: net.minecraft.nbt.NBTTagList cannot be cast to net.minecraft.nbt.NBTTagCompound
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at fr.sosoh.hogsmod.common.entity.props.ExtendedEntityProps.loadNBTData(ExtendedEntityProps.java:83)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.Entity.readFromNBT(Entity.java:1616)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.readPlayerDataFromFile(ServerConfigurationManager.java:271)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:123)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
                                          [20:03:24] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
                                          

                                          La ligne 83: NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME);.

                                          Il n’y a pas besoin de mettre d’integer pour la taille de la liste.

                                          Voilà le code pour le load :

                                          
                                          @Override
                                          public void loadNBTData(NBTTagCompound compound) {
                                          NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME);
                                          this.mana = properties.getDouble("Mana");
                                          this.maxMana = properties.getDouble("MaxMana");
                                          this.spellRight = properties.getString("spellRight");
                                          this.spellLeft = properties.getString("spellLeft");
                                          NBTTagList list = compound.getTagList("Spells", Constants.NBT.TAG_STRING);
                                          for (int i = 0; i < list.tagCount(); i++) {
                                          NBTTagString nbtstring = list.getStringTagAt(i);
                                          this.spellsList.add(i, nbtstring.getString());
                                          }
                                          }
                                          

                                          Site web contenant mes scripts : http://SCAREXgaming.github.io

                                          Pas de demandes de support par MP ni par skype SVP.
                                          Je n'accepte sur skype que l…

                                          1 réponse Dernière réponse Répondre Citer 0
                                          • sosohS Hors-ligne
                                            sosoh
                                            dernière édition par

                                            Donc j’ai pas besoin de l’envoyer non plus ?
                                            Edit: http://gyazo.com/c462db8e22923b3f9699364e41ca69ce

                                            Developpeur d'Hogsmod, un mod implémentant le Monde d'Harry Potter dans Minecraft!

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB