MFF

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

    Plusieurs problèmes de mise à jour

    Planifier Épinglé Verrouillé Déplacé Sans suite
    1.9
    69 Messages 8 Publieurs 13.1k 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.
    • AxaurusA Hors-ligne
      Axaurus
      dernière édition par

      Pourtant, il est bien renseigné partout où il doit être. Quand je met la plaine, ça marche bien. Mais dès que je met mon biome, ça bug.

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

        Montre la classe du biome.

        Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

        AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

        Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
        Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

          Salut

          package thisishalloween.world.frightful;
          
          import net.minecraft.init.Blocks;
          import net.minecraft.world.biome.BiomeGenBase;
          import net.minecraft.world.biome.BiomeGenPlains;
          import thisishalloween.entity.EntityEvilChicken;
          import thisishalloween.entity.EntityEvilCow;
          import thisishalloween.entity.EntityEvilPig;
          import thisishalloween.entity.EntityEvilSheep;
          import thisishalloween.entity.EntityGhost;
          import thisishalloween.entity.EntityMummy;
          import thisishalloween.entity.EntityVampire;
          
          public class BiomeGenEvilland extends BiomeGenBase
          {
          public BiomeGenEvilland(BiomeProperties i)
          {
          super(i);
             this.spawnableCaveCreatureList.clear();
             this.spawnableWaterCreatureList.clear();
             this.spawnableMonsterList.clear();
             this.spawnableCreatureList.clear();
          
             this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilPig.class, 40, 8, 10));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilSheep.class, 40, 8, 10));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilChicken.class, 40, 8, 10));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilCow.class, 40, 8, 10));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityMummy.class, 50, 1, 4));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityVampire.class, 50, 1, 4));
          this.spawnableMonsterList.add(new SpawnListEntry(EntityGhost.class, 50, 1, 4));
             this.addFlower(Blocks.yellow_flower.getDefaultState(), 10);// …
             this.topBlock = Blocks.grass.getDefaultState();
             this.fillerBlock = Blocks.dirt.getDefaultState();
          
             this.theBiomeDecorator.flowersPerChunk = 4;
             this.theBiomeDecorator.treesPerChunk = 5;
             this.theBiomeDecorator.grassPerChunk = 5;
          this.theBiomeDecorator.mushroomsPerChunk = 2;
          this.theBiomeDecorator.reedsPerChunk = 2;
          this.theBiomeDecorator.generateLakes = true;
          }
          
          }
          
          1 réponse Dernière réponse Répondre Citer 0
          • AxaurusA Hors-ligne
            Axaurus
            dernière édition par

            Salut
            Je up ce topic pour vous dire que j’ai enfin réussi à faire marcher mon biome.
            J’ai modifier son système (j’ai aussi profiter pour refaire la dimension) :
            Dans le init de la classe principale :

            Evilland = BiomeGenEvilland.instance = new BiomeGenEvilland();
            Biome.registerBiome(BiomeGenEvilland.BIOME_ID, BiomeGenEvilland.instance.getBiomeName(), BiomeGenEvilland.instance);
            ``` et la classe de mon biome : ```java
            package thisishalloween.world.frightful;
            
            import net.minecraft.init.Blocks;
            import net.minecraft.world.biome.Biome;
            import thisishalloween.entity.EntityEvilChicken;
            import thisishalloween.entity.EntityEvilCow;
            import thisishalloween.entity.EntityEvilPig;
            import thisishalloween.entity.EntityEvilSheep;
            import thisishalloween.entity.EntityGhost;
            import thisishalloween.entity.EntityMummy;
            import thisishalloween.entity.EntityVampire;
            
            public class BiomeGenEvilland extends Biome
            {
            public static BiomeGenEvilland instance;
            public static final String BIOME_NAME = "Evilland";
            public static final int BIOME_ID = 255;
            
            public BiomeGenEvilland()
            {
            super(properties());
               this.spawnableCaveCreatureList.clear();
               this.spawnableWaterCreatureList.clear();
               this.spawnableMonsterList.clear();
               this.spawnableCreatureList.clear();
            
               this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilPig.class, 40, 8, 10));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilSheep.class, 40, 8, 10));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilChicken.class, 40, 8, 10));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityEvilCow.class, 40, 8, 10));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityMummy.class, 50, 1, 4));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityVampire.class, 50, 1, 4));
            this.spawnableMonsterList.add(new SpawnListEntry(EntityGhost.class, 50, 1, 4));    // Pour ajouter une fleur (state, probabilité)
               this.addFlower(Blocks.YELLOW_FLOWER.getDefaultState(), 10);// …
               this.topBlock = Blocks.GRASS.getDefaultState();
               this.fillerBlock = Blocks.DIRT.getDefaultState();
            
               this.theBiomeDecorator.flowersPerChunk = 4;
               this.theBiomeDecorator.treesPerChunk = 5;
               this.theBiomeDecorator.grassPerChunk = 5;
            this.theBiomeDecorator.mushroomsPerChunk = 2;
            this.theBiomeDecorator.reedsPerChunk = 2;
            this.theBiomeDecorator.generateLakes = true;
            }
            
            private static Biome.BiomeProperties properties()
            {
            Biome.BiomeProperties properties = new Biome.BiomeProperties(BIOME_NAME);
            properties.setBaseHeight(0.125F);
            properties.setHeightVariation(0.05F);
            properties.setRainDisabled();
            return properties;
            }
            }
            ``` Après, c'est sûr, il y a plein d'autres moyen, mais celui-là marche, j'en suis satisfait :-).
            Il ne reste plus que le tp qui bug.
            Merci d'avance
            
            EDIT : J'ai oublié de vous dire, je suis désormais en 1.9.4\. Auparavant, j'était en 1.9 1er du nom
            1 réponse Dernière réponse Répondre Citer 0
            • AxaurusA Hors-ligne
              Axaurus
              dernière édition par

              Salut
              J’ai continué de chercher pour le problème de tp et j’ai trouvé des choses assez étonnantes : quand j’utilise la fonction changeDimension de la classe entity, ça me tp bien seulement si je met la dimension 1 (qui correspond à l’End). Si je veux aller dans le Nether ou dans ma dimension, ça crash. Par contre, si je met ma propre fonction changeDimension (qui est une pure copie de la fonction d’origine (à part un truc)), ça me tp dans la dimension que je veux seulement après avoir relancé le monde. Déjà, (juste pour savoir, je ne l’utiliserais pas) pourquoi ça crash quand j’utilise la fonction de base (celle de la classe Entity) ?
              Ensuite, j’ai trouvé un truc (je ne sais pas si c’est ça qui résoudra le bug) : ```java
              public Entity changeDimension(Entity entity, int dimensionIn)
                 {
                     if (!entity.worldObj.isRemote && !entity.isDead)
                     {
                         if (!net.minecraftforge.common.ForgeHooks.onTravelToDimension(entity, dimensionIn)) return null;
                         entity.worldObj.theProfiler.startSection(“changeDimension”);
                         MinecraftServer minecraftserver = entity.getServer();
                         int i = entity.dimension;
                         WorldServer worldserver = minecraftserver.worldServerForDimension(i);
                         WorldServer worldserver1 = minecraftserver.worldServerForDimension(dimensionIn);
                         entity.dimension = dimensionIn;

              if (i == 1 && dimensionIn == 1)
                         {
                             worldserver1 = minecraftserver.worldServerForDimension(0);
                             entity.dimension = 0;
                         }

              entity.worldObj.removeEntity(entity);
                         entity.isDead = false;
                         entity.worldObj.theProfiler.startSection(“reposition”);
                         BlockPos blockpos;

              if (dimensionIn == 1)
                         {
                             blockpos = worldserver1.getSpawnCoordinate();
                         }
                         else
                         {
                             double d0 = entity.posX;
                             double d1 = entity.posZ;
                             double d2 = 8.0D;

              if (dimensionIn == -1)
                             {
                                 d0 = MathHelper.clamp_double(d0 / d2, worldserver1.getWorldBorder().minX() + 16.0D, worldserver1.getWorldBorder().maxX() - 16.0D);
                                 d1 = MathHelper.clamp_double(d1 / d2, worldserver1.getWorldBorder().minZ() + 16.0D, worldserver1.getWorldBorder().maxZ() - 16.0D);
                             }
                             else if (dimensionIn == 0)
                             {
                                 d0 = MathHelper.clamp_double(d0 * d2, worldserver1.getWorldBorder().minX() + 16.0D, worldserver1.getWorldBorder().maxX() - 16.0D);
                                 d1 = MathHelper.clamp_double(d1 * d2, worldserver1.getWorldBorder().minZ() + 16.0D, worldserver1.getWorldBorder().maxZ() - 16.0D);
                             }

              d0 = (double)MathHelper.clamp_int((int)d0, -29999872, 29999872);
                             d1 = (double)MathHelper.clamp_int((int)d1, -29999872, 29999872);
                             float f = entity.rotationYaw;
                             entity.setLocationAndAngles(d0, entity.posY, d1, 90.0F, 0.0F);
                             Teleporter teleporter = new Teleporter(entity.getServer().worldServerForDimension(entity.dimension));
                             teleporter.placeInExistingPortal(entity, f);
                             blockpos = new BlockPos(entity);
                         }

              worldserver.updateEntityWithOptionalForce(entity, false);
                         entity.worldObj.theProfiler.endStartSection(“reloading”);
                         Entity entity1 = EntityList.createEntityByName(EntityList.getEntityString(entity), worldserver1);

              if (entity1 != null)
                         {
                       //      entity1.copyDataFromOld(entity1);

              BlockPos lastPortalPos = new BlockPos(entity.posX, entity.posY, entity.posZ);
              Vec3d lastPortalVec = entity.getLastPortalVec();
              EnumFacing teleportDirection = entity.getTeleportDirection();

              entity.timeUntilPortal = entity1.timeUntilPortal;
              ObfuscationReflectionHelper.setPrivateValue(Entity.class, entity1, lastPortalPos, “lastPortalPos”);
              ObfuscationReflectionHelper.setPrivateValue(Entity.class, entity1, lastPortalVec, “lastPortalVec”);
              ObfuscationReflectionHelper.setPrivateValue(Entity.class, entity1, teleportDirection, “teleportDirection”);

              if (i == 1 && dimensionIn == 1)
                             {
                                 BlockPos blockpos1 = worldserver1.getTopSolidOrLiquidBlock(worldserver1.getSpawnPoint());
                                 entity1.moveToBlockPosAndAngles(blockpos1, entity1.rotationYaw, entity1.rotationPitch);
                             }
                             else
                             {
                                 entity1.moveToBlockPosAndAngles(blockpos, entity1.rotationYaw, entity1.rotationPitch);
                             }

              boolean flag = entity1.forceSpawn;
                             entity1.forceSpawn = true;
                             worldserver1.spawnEntityInWorld(entity1);
                             entity1.forceSpawn = flag;
                             worldserver1.updateEntityWithOptionalForce(entity1, false);
                         }
                         else
                         {
                          System.out.println(“entity1 == null”);
                         }

              entity.isDead = true;
                         entity.worldObj.theProfiler.endSection();
                         worldserver.resetUpdateEntityTick();
                         worldserver1.resetUpdateEntityTick();
                         entity.worldObj.theProfiler.endSection();
                         return entity1;
                     }
                     else
                     {
                         return null;
                     }

              [15:29:50] [Server thread/FATAL]: Error executing task
              java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Colliding entity with block
              at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_92]
              at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_92]
              at net.minecraft.util.Util.runTask(Util.java:26) [Util.class:?]
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:740) [MinecraftServer.class:?]
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685) [MinecraftServer.class:?]
              at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155) [IntegratedServer.class:?]
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534) [MinecraftServer.class:?]
              at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
              Caused by: net.minecraft.util.ReportedException: Colliding entity with block
              at net.minecraft.entity.Entity.moveEntity(Entity.java:965) ~[Entity.class:?]
              at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:500) ~[NetHandlerPlayServer.class:?]
              at net.minecraft.network.play.client.CPacketPlayer.processPacket(CPacketPlayer.java:36) ~[CPacketPlayer.class:?]
              at net.minecraft.network.play.client.CPacketPlayer$Position.processPacket(CPacketPlayer.java:85) ~[CPacketPlayer$Position.class:?]
              at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_92]
              at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_92]
              at net.minecraft.util.Util.runTask(Util.java:25) ~[Util.class:?]
              … 5 more
              Caused by: java.lang.NullPointerException
              at thisishalloween.block.BlockPortalFrightful.changeDimension(BlockPortalFrightful.java:331) ~[BlockPortalFrightful.class:?]
              at thisishalloween.block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:245) ~[BlockPortalFrightful.class:?]
              at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:1040) ~[Entity.class:?]
              at net.minecraft.entity.Entity.moveEntity(Entity.java:958) ~[Entity.class:?]
              at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:500) ~[NetHandlerPlayServer.class:?]
              at net.minecraft.network.play.client.CPacketPlayer.processPacket(CPacketPlayer.java:36) ~[CPacketPlayer.class:?]
              at net.minecraft.network.play.client.CPacketPlayer$Position.processPacket(CPacketPlayer.java:85) ~[CPacketPlayer$Position.class:?]
              at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_92]
              at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_92]
              at net.minecraft.util.Util.runTask(Util.java:25) ~[Util.class:?]
              … 5 more
              [15:29:50] [Server thread/ERROR]: Encountered an unexpected exception
              net.minecraft.util.ReportedException: Colliding entity with block
              at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:210) ~[NetworkSystem.class:?]
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:804) ~[MinecraftServer.class:?]
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685) ~[MinecraftServer.class:?]
              at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155) ~[IntegratedServer.class:?]
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534) [MinecraftServer.class:?]
              at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
              Caused by: java.lang.NullPointerException
              at thisishalloween.block.BlockPortalFrightful.changeDimension(BlockPortalFrightful.java:331) ~[BlockPortalFrightful.class:?]
              at thisishalloween.block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:245) ~[BlockPortalFrightful.class:?]
              at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:1040) ~[Entity.class:?]
              at net.minecraft.entity.Entity.moveEntity(Entity.java:958) ~[Entity.class:?]
              at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1952) ~[EntityLivingBase.class:?]
              at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1929) ~[EntityPlayer.class:?]
              at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2382) ~[EntityLivingBase.class:?]
              at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:549) ~[EntityPlayer.class:?]
              at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2174) ~[EntityLivingBase.class:?]
              at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:253) ~[EntityPlayer.class:?]
              at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:341) ~[EntityPlayerMP.class:?]
              at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:175) ~[NetHandlerPlayServer.class:?]
              at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:196) ~[NetworkDispatcher$1.class:?]
              at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:308) ~[NetworkManager.class:?]
              at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:195) ~[NetworkSystem.class:?]
              … 5 more
              [15:29:50] [Server thread/ERROR]: This crash report has been saved to: G:\Codage\Minecraft\This_is_Halloween\v1.3\MC 1.9.4\run.\crash-reports\crash-2016-08-24_15.29.50-server.txt
              [15:29:50] [Server thread/INFO]: Stopping server
              [15:29:50] [Server thread/INFO]: Saving players
              [15:29:50] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: –-- Minecraft Crash Report ----
              // I let you down. Sorry 😞

              Time: 24/08/16 15:29
              Description: Colliding entity with block

              java.lang.NullPointerException: Colliding entity with block
              at thisishalloween.block.BlockPortalFrightful.changeDimension(BlockPortalFrightful.java:331)
              at thisishalloween.block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:245)
              at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:1040)
              at net.minecraft.entity.Entity.moveEntity(Entity.java:958)
              at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1952)
              at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1929)
              at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2382)
              at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:549)
              at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2174)
              at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:253)
              at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:341)
              at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:175)
              at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:196)
              at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:308)
              at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:195)
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:804)
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685)
              at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155)
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534)
              at java.lang.Thread.run(Unknown Source)

              A detailed walkthrough of the error, its code path and all known details is as follows:

              – Head –
              Thread: Client thread
              Stacktrace:
              at thisishalloween.block.BlockPortalFrightful.changeDimension(BlockPortalFrightful.java:331)
              at thisishalloween.block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:245)

              – Block being collided with –
              Details:
              Block: this_is_halloween:PortalFrightful[axis=x]
              Block location: World: (-1433,4,949), Chunk: (at 7,0,5 in -90,59; contains blocks -1440,0,944 to -1425,255,959), Region: (-3,1; contains chunks -96,32 to -65,63, blocks -1536,0,512 to -1025,255,1023)
              Stacktrace:
              at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:1040)

              – Entity being checked for collision –
              Details:
              Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
              Entity ID: 31
              Entity Name: Player222
              Entity’s Exact location: -1432,19, 4,00, 948,83
              Entity’s Block location: World: (-1433,4,948), Chunk: (at 7,0,4 in -90,59; contains blocks -1440,0,944 to -1425,255,959), Region: (-3,1; contains chunks -96,32 to -65,63, blocks -1536,0,512 to -1025,255,1023)
              Entity’s Momentum: 0,00, 0,00, 0,00
              Entity’s Passengers: []
              Entity’s Vehicle: ERROR NullPointerException: null
              Stacktrace:
              at net.minecraft.entity.Entity.moveEntity(Entity.java:958)
              at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1952)
              at net.minecraft.entity.player.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1929)
              at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2382)
              at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:549)
              at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2174)
              at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:253)

              – Player being ticked –
              Details:
              Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
              Entity ID: 31
              Entity Name: Player222
              Entity’s Exact location: -1432,19, 4,00, 948,83
              Entity’s Block location: World: (-1433,4,948), Chunk: (at 7,0,4 in -90,59; contains blocks -1440,0,944 to -1425,255,959), Region: (-3,1; contains chunks -96,32 to -65,63, blocks -1536,0,512 to -1025,255,1023)
              Entity’s Momentum: 0,00, 0,00, 0,00
              Entity’s Passengers: []
              Entity’s Vehicle: ERROR NullPointerException: null
              Stacktrace:
              at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:341)
              at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:175)
              at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:196)
              at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:308)

              – Ticking connection –
              Details:
              Connection: net.minecraft.network.NetworkManager@bc70390
              Stacktrace:
              at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:195)
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:804)
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685)
              at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155)
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534)
              at java.lang.Thread.run(Unknown Source)

              – System Details –
              Details:
              Minecraft Version: 1.9.4
              Operating System: Windows 10 (amd64) version 10.0
              Java Version: 1.8.0_92, Oracle Corporation
              Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
              Memory: 673332264 bytes (642 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
              JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
              IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
              FML: MCP 9.28 Powered by Forge 12.17.0.1976 4 mods loaded, 4 mods active
              States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored
              UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
              UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.9.4-12.17.0.1976.jar)
              UCHIJAAAA Forge{12.17.0.1976} [Minecraft Forge] (forgeSrc-1.9.4-12.17.0.1976.jar)
              UCHIJAAAA This_is_Halloween{1.3} [This_is_Halloween] (bin)
              Loaded coremods (and transformers):
              GL info: ERROR RuntimeException: No OpenGL context found in the current thread.
              Profiler Position: N/A (disabled)
              Player Count: 1 / 8; [EntityPlayerMP[‘Player222’/31, l=‘New World’, x=-1432,19, y=4,00, z=948,83]]
              Type: Integrated Server (map_client.txt)
              Is Modded: Definitely; Client brand changed to ‘fml,forge’
              [15:29:50] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2016-08-24_15.29.50-server.txt
              [15:29:50] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
              [15:29:50] [Server thread/INFO]: Saving worlds
              [15:29:50] [Server thread/INFO]: Saving chunks for level ‘New World’/Overworld
              [15:29:50] [Server thread/INFO]: Saving chunks for level ‘New World’/Nether
              [15:29:50] [Server thread/INFO]: Saving chunks for level ‘New World’/The End
              [15:29:50] [Server thread/INFO]: Saving chunks for level ‘New World’/Frightful
              [15:29:50] [Server thread/INFO] [FML]: Unloading dimension 0
              [15:29:50] [Server thread/INFO] [FML]: Unloading dimension -1
              [15:29:50] [Server thread/INFO] [FML]: Unloading dimension 1
              [15:29:50] [Server thread/INFO] [FML]: Unloading dimension -5
              [15:29:50] [Server thread/INFO] [FML]: Applying holder lookups
              [15:29:50] [Server thread/INFO] [FML]: Holder lookups applied
              [15:29:50] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
              [15:29:50] [Client thread/INFO] [FML]: Server terminated.
              AL lib: (EE) alc_cleanup: 1 device not closed
              Java HotSpot™ 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

              (c'est normal que ça crash, vu que entity1 est null ça veut redéfinir une variable par un null)
              Celui-ci pointe vers ```java
              entity.timeUntilPortal = entity1.timeUntilPortal;
              ```(pour ceux qui n'aurait pas lu depuis le début du topic et qui ne comprennent pas pourquoi j'ai mis cette ligne et les 3 ReflectionHelper du dessous, c'est que la fonction copyDataFromOld doit être appelé, mais elle est privée.)
              
              Merci d'avance
              1 réponse Dernière réponse Répondre Citer 0
              • robin4002R Hors-ligne
                robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                dernière édition par

                at thisishalloween.block.BlockPortalFrightful.changeDimension(BlockPortalFrightful.java:331) ~[BlockPortalFrightful.class:?]
                C’est laquelle la ligne 331 ?

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

                  C’est la ligne que j’ai doné au-dessus, ```java
                  entity.timeUntilPortal = entity1.timeUntilPortal;

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

                    Comment est-ce possible ? entity1 ne peut pas être null comme il y a un null check, et si entity est null il y aura eu un NPE avant.

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

                      Justement, j’ai inverse le null check, j’ai fait que si entity1 est null, alors ça fait …
                      Je savais que ça marcherais pas, c’était juste pour être sûr.
                      Mais je comprend pas pourquoi il est null

                      entity1 est défini par : ```java
                                 Entity entity1 = EntityList.createEntityByName(EntityList.getEntityString(entity), worldserver1);

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

                        faut voir ce que fais la fonction createEntityByName

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

                          D’après ce que j’en ai compris, au départ ça créer une variable de type Entity qui est null. Ensuite, ça essaye de récupérer la classe du String inséré en paramètre. Si la classe n’est pas null (autrement dit, si elle existe ?), ça get un constructeur et ça créer une nouvelle instance.

                          Je suis pas sûr, mais pour moi ça fait ça. Voilà la fonction : ```java
                          @Nullable
                          public static Entity createEntityByName(String entityName, World worldIn)
                          {
                          Entity entity = null;

                          try
                          {
                          Class oclass = (Class)NAME_TO_CLASS.get(entityName);

                          if (oclass != null)
                          {
                          entity = (Entity)oclass.getConstructor(new Class[] {World.class}).newInstance(new Object[] {worldIn});
                          }
                          }
                          catch (Exception exception)
                          {
                          exception.printStackTrace();
                          }

                          return entity;
                          }

                          
                          Si j'ai raison au-dessus, je pense que ça n'arrive pas à récuprer la classe.
                          1 réponse Dernière réponse Répondre Citer 0
                          • AymericRedA Hors-ligne
                            AymericRed
                            dernière édition par

                            Car il me semble que cette fonction est faite pour les entités, mais pas pour les joueurs.

                            Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                            AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                            Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                            Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                              Pourtant le portal de base utilisé aussi cette fonction. Un joueur est avant tout une entité, non ?

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

                                Le portail de base utilise cette fonction pour les entitées, mais regarde bien, pour les joueurs c’est une autre fonction que “changeDimension” qui est appelée.

                                Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                  Pourtant, ça utilise bien la fonction changeDimension.
                                  Dans le blockPortl, ça appelle cette fonction : ```java
                                  public void setPortal(BlockPos pos)
                                     {
                                         if (this.timeUntilPortal > 0)
                                         {
                                             this.timeUntilPortal = this.getPortalCooldown();
                                         }
                                         else
                                         {
                                             if (!this.worldObj.isRemote && !pos.equals(this.lastPortalPos))
                                             {
                                                 this.lastPortalPos = new BlockPos(pos);
                                                 BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.PORTAL.createPatternHelper(this.worldObj, this.lastPortalPos);
                                                 double d0 = blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? (double)blockpattern$patternhelper.getFrontTopLeft().getZ() : (double)blockpattern$patternhelper.getFrontTopLeft().getX();
                                                 double d1 = blockpattern$patternhelper.getForwards().getAxis() == EnumFacing.Axis.X ? this.posZ : this.posX;
                                                 d1 = Math.abs(MathHelper.pct(d1 - (double)(blockpattern$patternhelper.getForwards().rotateY().getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE ? 1 : 0), d0, d0 - (double)blockpattern$patternhelper.getWidth()));
                                                 double d2 = MathHelper.pct(this.posY - 1.0D, (double)blockpattern$patternhelper.getFrontTopLeft().getY(), (double)(blockpattern$patternhelper.getFrontTopLeft().getY() - blockpattern$patternhelper.getHeight()));
                                                 this.lastPortalVec = new Vec3d(d1, d2, 0.0D);
                                                 this.teleportDirection = blockpattern$patternhelper.getForwards();
                                             }

                                  this.inPortal = true;
                                         }
                                     }

                                  Ici, ```java
                                  public void onEntityUpdate()
                                     {
                                         this.worldObj.theProfiler.startSection("entityBaseTick");
                                  
                                         if (this.isRiding() && this.getRidingEntity().isDead)
                                         {
                                             this.dismountRidingEntity();
                                         }
                                  
                                         if (this.rideCooldown > 0)
                                         {
                                             –this.rideCooldown;
                                         }
                                  
                                         this.prevDistanceWalkedModified = this.distanceWalkedModified;
                                         this.prevPosX = this.posX;
                                         this.prevPosY = this.posY;
                                         this.prevPosZ = this.posZ;
                                         this.prevRotationPitch = this.rotationPitch;
                                         this.prevRotationYaw = this.rotationYaw;
                                  
                                         if (!this.worldObj.isRemote && this.worldObj instanceof WorldServer)
                                         {
                                             this.worldObj.theProfiler.startSection("portal");
                                  
                                             if (this.inPortal)
                                             {
                                                 MinecraftServer minecraftserver = this.worldObj.getMinecraftServer();
                                  
                                                 if (minecraftserver.getAllowNether())
                                                 {
                                                     if (!this.isRiding())
                                                     {
                                                         int i = this.getMaxInPortalTime();
                                  
                                                         if (this.portalCounter++ >= i)
                                                         {
                                                             this.portalCounter = i;
                                                             this.timeUntilPortal = this.getPortalCooldown();
                                                             int j;
                                  
                                                             if (this.worldObj.provider.getDimensionType().getId() == -1)
                                                             {
                                                                 j = 0;
                                                             }
                                                             else
                                                             {
                                                                 j = -1;
                                                             }
                                  
                                                             this.changeDimension(j);
                                                         }
                                                     }
                                  
                                                     this.inPortal = false;
                                                 }
                                             }
                                             else
                                             {
                                                 if (this.portalCounter > 0)
                                                 {
                                                     this.portalCounter -= 4;
                                                 }
                                  
                                                 if (this.portalCounter < 0)
                                                 {
                                                     this.portalCounter = 0;
                                                 }
                                             }
                                  
                                             this.decrementTimeUntilPortal();
                                             this.worldObj.theProfiler.endSection();
                                         }...
                                  ```(je l'ai coupé car trop longue et le reste pas intéréssant) ça utilise bien la fonction changeDimension
                                  1 réponse Dernière réponse Répondre Citer 0
                                  • AymericRedA Hors-ligne
                                    AymericRed
                                    dernière édition par

                                    Ah autant pour moi, ça a du changer dans ta version, ou alors, le EntityPlayer (ou EntityPlayerMP) gère à sa façon le isInPortal.

                                    Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                    AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                    Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                    Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                      J’ai regarder, mais je trouve rien d’autre qui gère le inPortal.

                                      Mais c’est quand même bizarre que quand j’utilise la fonction changeDimension d’origine, ça marche bien suelement si je vais dans l’End (je comprend pas pourquoi les autres dimensions bug). La mienne est une pure copie et bug.

                                      Pour le entity1 qui est null, j’ai pu trouver pourquoi. En fait, j’ai décomposé chaque étape et affiché dans les lgos :

                                      System.out.println("getEntityString : " + EntityList.getEntityString(entity));
                                                 System.out.println("getEntityStringFromClass : " + getEntityStringFromClass(Entity.class));
                                                 System.out.println("createEntityByName : " + EntityList.createEntityByName(EntityList.getEntityStringFromClass(Entity.class), worldserver1));
                                      

                                      (je suis d’accord avec vous, le 1er et le 2ème reviennent au même)
                                      En gros, si ler 1er (ou le 2ème, c’est pareil) est null, le 3ème sera forcément null (à cause du 1er (ou du 2ème)). Et bah ça se confirme : le 1er et le 2ème sont bien null.
                                      C’est cette fonction qui bug : ```java
                                         public static String getEntityStringFromClass(Class entityClass)
                                         {
                                             return (String)CLASS_TO_NAME.get(entityClass);
                                         }

                                      
                                      Pourtant avant j'utilisais simplement ```java
                                      mcServer.getPlayerList().transferPlayerToDimension(player, -1, new Teleporter(mcServer.worldServerForDimension(-1)));
                                      ``` Je vois pas pourquoi elle bug maintenant
                                      1 réponse Dernière réponse Répondre Citer 0
                                      • SCAREXS Hors-ligne
                                        SCAREX
                                        dernière édition par

                                        Tu utilises l’id -1 pour ta dimension ?

                                        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
                                        • AxaurusA Hors-ligne
                                          Axaurus
                                          dernière édition par

                                          Non, ma dimension c’est -5. Mais j’ai mis -1 pour que ça m’emmène vers le Nether, pour être sûr que c’est pas ma dimension qui bug

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

                                            Salut
                                            Je reviens après très longtemps (quand même 3 semaines). J’étais pas mal occupée par le lycée.
                                            (Je ne sais pas si vous vous souvenez toujours du problème, je vais vous l’énoncer :
                                            :::
                                            Pour faire court, avant j’utilisais une fonction (transferPlayerToDimension) pour me tp à ma dimension custom. Mais depuis la 1.9.4 (pareil en 1.10), ça crash quand j’entre dans le portail. Le voici :

                                            [18:27:16] [Server thread/FATAL]: Error executing task
                                            java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Colliding entity with block
                                            at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_92]
                                            at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_92]
                                            at net.minecraft.util.Util.runTask(Util.java:26) [Util.class:?]
                                            at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:740) [MinecraftServer.class:?]
                                            at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:685) [MinecraftServer.class:?]
                                            at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:155) [IntegratedServer.class:?]
                                            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:534) [MinecraftServer.class:?]
                                            at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
                                            Caused by: net.minecraft.util.ReportedException: Colliding entity with block
                                            at net.minecraft.entity.Entity.moveEntity(Entity.java:965) ~[Entity.class:?]
                                            at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:500) ~[NetHandlerPlayServer.class:?]
                                            at net.minecraft.network.play.client.CPacketPlayer.processPacket(CPacketPlayer.java:36) ~[CPacketPlayer.class:?]
                                            at net.minecraft.network.play.client.CPacketPlayer$Position.processPacket(CPacketPlayer.java:85) ~[CPacketPlayer$Position.class:?]
                                            at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
                                            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_92]
                                            at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_92]
                                            at net.minecraft.util.Util.runTask(Util.java:25) ~[Util.class:?]
                                            … 5 more
                                            Caused by: java.lang.NullPointerException
                                            at net.minecraft.world.Teleporter.placeInExistingPortal(Teleporter.java:134) ~[Teleporter.class:?]
                                            at net.minecraft.world.Teleporter.placeInPortal(Teleporter.java:38) ~[Teleporter.class:?]
                                            at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:734) ~[PlayerList.class:?]
                                            at net.minecraft.server.management.PlayerList.transferPlayerToDimension(PlayerList.java:641) ~[PlayerList.class:?]
                                            at thisishalloween.block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:244) ~[BlockPortalFrightful.class:?]
                                            at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:1040) ~[Entity.class:?]
                                            at net.minecraft.entity.Entity.moveEntity(Entity.java:958) ~[Entity.class:?]
                                            at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:500) ~[NetHandlerPlayServer.class:?]
                                            at net.minecraft.network.play.client.CPacketPlayer.processPacket(CPacketPlayer.java:36) ~[CPacketPlayer.class:?]
                                            at net.minecraft.network.play.client.CPacketPlayer$Position.processPacket(CPacketPlayer.java:85) ~[CPacketPlayer$Position.class:?]
                                            at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
                                            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_92]
                                            at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_92]
                                            at net.minecraft.util.Util.runTask(Util.java:25) ~[Util.class:?]
                                            … 5 more
                                            [18:27:16] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 4445ms behind, skipping 88 tick(s)
                                            [18:27:17] [Server thread/INFO] [FML]: Unloading dimension -5
                                            

                                            J’avais ensuite essayer avec le Nether et le teleporter de base mais pareil.
                                            J’ai testé plein de trucs avec l’aide de plusieurs membres, mais toujours rien. Voilà au point où on en est
                                            :::
                                            Bref, j’ai remis l’ancienne fonction (transferPlayerToDimension, celle qui marche pour tout le monde sauf pour moi 😢 ) en modifiant des trucs, toujours rien. Même quand j’essaye d’y accéder depuis le Nether. J’ai pensé que c’étais ma version de Forge qui buguait et ai voulu télécharger la recommandé, mais c’est celle là que j’ai.
                                            Le crash m’indique cette ligne : ```java
                                                       d6 = (double)(blockpattern$patternhelper.getFrontTopLeft().getY() + 1) - entityIn.getLastPortalVec().yCoord * (double)blockpattern$patternhelper.getHeight();

                                            Il y a une NPE dans le crash. J'avais donc pensé voir le crash-report en pensant que y'aurai plus d'info, mais il n'existe pas. Et c'est normal, Minecraft ne crash pas (il se fige juste mais ne s'éteint pas). Du coup, j'avais pensé à faire crasher Minecraft au moment du tp histoire de voir ce qu'il y aura dans le crash-report, peut-être une chance de nous aider.
                                            
                                            En gros, on est au même point qu'avant :/
                                            
                                            Merci d'avance
                                            1 réponse Dernière réponse Répondre Citer 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • Premier message
                                              Dernier message
                                            Design by Woryk
                                            ContactMentions Légales

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB