MFF

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

    Mettre à jour une dimension

    Planifier Épinglé Verrouillé Déplacé Sans suite
    1.8
    32 Messages 4 Publieurs 6.7k 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.
    • DiangleD Hors-ligne
      Diangle
      dernière édition par

      Passer une dimension 1.7 ==> 1.8 est simple (quand tu manipule bien les dimensions et encore…). Le seul et gros problème c’est que beaucoup de fonction on changé. Je vais regarder, ton code et voir ce qui va pas. (je te le mettrai en edit)

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

        Ta variable GenBiomes est nul,

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

          @‘SCAREX’:

          Ta variable GenBiomes est nul,

          il n’y a pas que ça, helas…

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

            package fr.diangle.divinity.ftrggggggggggggggvbcxd;
            
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD;
            import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE;
            import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS;
            import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON;
            import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE;
            import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE;
            import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA;
            
            import java.util.Iterator;
            import java.util.List;
            import java.util.Random;
            
            import com.google.common.collect.Lists;
            
            import net.minecraft.block.Block;
            import net.minecraft.block.BlockFalling;
            import net.minecraft.block.state.IBlockState;
            import net.minecraft.client.multiplayer.ChunkProviderClient;
            import net.minecraft.entity.EnumCreatureType;
            import net.minecraft.init.Blocks;
            import net.minecraft.util.BlockPos;
            import net.minecraft.util.IProgressUpdate;
            import net.minecraft.util.MathHelper;
            import net.minecraft.world.ChunkCoordIntPair;
            import net.minecraft.world.SpawnerAnimals;
            import net.minecraft.world.World;
            import net.minecraft.world.WorldType;
            import net.minecraft.world.biome.BiomeGenBase;
            import net.minecraft.world.chunk.Chunk;
            import net.minecraft.world.chunk.ChunkPrimer;
            import net.minecraft.world.chunk.IChunkProvider;
            import net.minecraft.world.gen.ChunkProviderEnd;
            import net.minecraft.world.gen.ChunkProviderGenerate;
            import net.minecraft.world.gen.ChunkProviderSettings;
            import net.minecraft.world.gen.MapGenBase;
            import net.minecraft.world.gen.MapGenCaves;
            import net.minecraft.world.gen.MapGenRavine;
            import net.minecraft.world.gen.NoiseGenerator;
            import net.minecraft.world.gen.NoiseGeneratorOctaves;
            import net.minecraft.world.gen.NoiseGeneratorPerlin;
            import net.minecraft.world.gen.feature.WorldGenDungeons;
            import net.minecraft.world.gen.feature.WorldGenLakes;
            import net.minecraft.world.gen.structure.MapGenMineshaft;
            import net.minecraft.world.gen.structure.MapGenScatteredFeature;
            import net.minecraft.world.gen.structure.MapGenStronghold;
            import net.minecraft.world.gen.structure.MapGenStructure;
            import net.minecraft.world.gen.structure.MapGenVillage;
            import net.minecraft.world.gen.structure.StructureOceanMonument;
            import net.minecraftforge.common.MinecraftForge;
            import net.minecraftforge.event.terraingen.ChunkProviderEvent;
            import net.minecraftforge.event.terraingen.PopulateChunkEvent;
            import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate;
            import net.minecraftforge.event.terraingen.TerrainGen;
            import net.minecraftforge.fml.common.eventhandler.Event.Result;
            
            public class ChunkProviderFrightful implements IChunkProvider
            {
            
            private Random rand;
            private NoiseGeneratorOctaves noiseGen1;
            private NoiseGeneratorOctaves noiseGen2;
            private NoiseGeneratorOctaves noiseGen3;
            private NoiseGeneratorPerlin noiseGen4;
            public NoiseGeneratorOctaves noiseGen5;
            public NoiseGeneratorOctaves noiseGen6;
            public NoiseGeneratorOctaves mobSpawnerNoise;
            private World worldObj;
            private Block block;
            private ChunkProviderSettings settings;
            private WorldType worldType;
            private final double[] noiseArray;
            private float[] parabolicField;
            // TODO private final double[] field_147434_q;
            private MapGenBase caveGenerator;
            private MapGenMineshaft mineshaftGenerator;
            private MapGenBase ravineGenerator;
            private boolean mapFeaturesEnabled;
            private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature();
            private double[] stoneNoise = new double[256];
            private BiomeGenBase[] biomesForGeneration;
            double[] noiseData1;
            double[] noiseData2;
            double[] noiseData3;
            double[] noiseData4;
            private final List structureGenerators = Lists.newArrayList();
            // TODO private final IBlockState[] cachedBlockIDs = new IBlockState[256];
            // TODO
            {
            caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE);
            mineshaftGenerator = (MapGenMineshaft)TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT);
            scatteredFeatureGenerator = (MapGenScatteredFeature)TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);
            ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE);
            }
            
            public ChunkProviderFrightful(World world, long seed, boolean features, String p_i45636_5_)
            {
            this.block = Blocks.water;
            this.worldObj = world;
            this.mapFeaturesEnabled = features;
            this.stoneNoise = new double[256];
            this.worldType = world.getWorldInfo().getTerrainType();
            this.rand = new Random(seed);
            this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16);
            this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
            this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
            this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4);
            this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
            this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
            this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
            this.noiseArray = new double[825];
            this.parabolicField = new float[25];
            this.caveGenerator = new MapGenCaves();
            this.mineshaftGenerator = new MapGenMineshaft();
            this.scatteredFeatureGenerator = new MapGenScatteredFeature();
            this.ravineGenerator = new MapGenRavine();
            
            for(int j = -2; j <= 2; ++j)
            {
            for(int k = -2; k <= 2; ++k)
            {
            float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
            this.parabolicField[j + 2 + (k + 2) * 5] = f;
            }
            }
            
            NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise};
            noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
            this.noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
            this.noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
            this.noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
            this.noiseGen4 = (NoiseGeneratorPerlin)noiseGens[3];
            this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
            this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
            this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
            }
            
            public Chunk provideChunk(int x, int z)
            {
            this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
            ChunkPrimer chunkprimer = new ChunkPrimer();
            this.setBlocksInChunk(x, z, chunkprimer);
            this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
            this.replaceBlockForBiome(x, z, chunkprimer, this.biomesForGeneration);
            this.caveGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
            this.ravineGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
            
            if(this.mapFeaturesEnabled)
            {
            this.scatteredFeatureGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
            }
            
            Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
            byte[] abyte = chunk.getBiomeArray();
            
            for(int k = 0; k < abyte.length; ++k)
            {
            abyte[k] = (byte)this.biomesForGeneration[k].biomeID;
            }
            
            chunk.generateSkylightMap();
            return chunk;
            }
            
            public void setBlocksInChunk(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_)
            {
            this.biomesForGeneration = this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration, p_180518_1_ * 4 - 2, p_180518_2_ * 4 - 2, 10, 10);
            this.func_147423_a(p_180518_1_ * 4, 0, p_180518_2_ * 4);
            
            for(int k = 0; k < 4; ++k)
            {
            int l = k * 5;
            int i1 = (k + 1) * 5;
            
            for(int j1 = 0; j1 < 4; ++j1)
            {
            int k1 = (l + j1) * 33;
            int l1 = (l + j1 + 1) * 33;
            int i2 = (i1 + j1) * 33;
            int j2 = (i1 + j1 + 1) * 33;
            
            for(int k2 = 0; k2 < 32; ++k2)
            {
            double d0 = 0.125D;
            double d1 = this.noiseArray[k1 + k2];//TODO
            double d2 = this.noiseArray[l1 + k2];
            double d3 = this.noiseArray[i2 + k2];
            double d4 = this.noiseArray[j2 + k2];
            double d5 = (this.noiseArray[k1 + k2 + 1] - d1) * d0;
            double d6 = (this.noiseArray[l1 + k2 + 1] - d2) * d0;
            double d7 = (this.noiseArray[i2 + k2 + 1] - d3) * d0;
            double d8 = (this.noiseArray[j2 + k2 + 1] - d4) * d0;
            
            for(int l2 = 0; l2 < 8; ++l2)
            {
            double d9 = 0.25D;
            double d10 = d1;
            double d11 = d2;
            double d12 = (d3 - d1) * d9;
            double d13 = (d4 - d2) * d9;
            
            for(int i3 = 0; i3 < 4; ++i3)
            {
            double d14 = 0.25D;
            double d16 = (d11 - d10) * d14;
            double d15 = d10 - d16;
            
            for(int j3 = 0; j3 < 4; ++j3)
            {
            if((d15 += d16) > 0.0D)
            {
            p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, Blocks.stone.getDefaultState());
            }
            else if(k2 * 8 + l2 < 64)//TODO
            {
            p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, this.block.getDefaultState());
            }
            }
            
            d10 += d12;
            d11 += d13;
            }
            
            d1 += d5;
            d2 += d6;
            d3 += d7;
            d4 += d8;
            }
            }
            }
            }
            }
            
            public void replaceBlockForBiome(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_)
            {
            ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj);
            MinecraftForge.EVENT_BUS.post(event);
            if(event.getResult() == Result.DENY)
            return;
            
            double d0 = 0.03125D;
            this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, (double)(p_180517_1_ * 16), (double)(p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
            
            for(int k = 0; k < 16; ++k)
            {
            for(int l = 0; l < 16; ++l)
            {
            BiomeGenBase biomegenbase = p_180517_4_[l + k * 16];
            biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k, p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]);
            }
            }
            }
            
            public boolean func_177460_a(IChunkProvider p_177460_1_, Chunk p_177460_2_, int p_177460_3_, int p_177460_4_)
            {
            return false;
            }
            
            private void func_147423_a(int x, int y, int z)
            {
            double d0 = 684.412D;
            double d1 = 684.412D;
            double d2 = 512.0D;
            double d3 = 512.0D;
            this.noiseData4 = this.noiseGen6.generateNoiseOctaves(this.noiseData4, x, z, 5, 5, 200.0D, 200.0D, 0.5D);
            this.noiseData1 = this.noiseGen3.generateNoiseOctaves(this.noiseData1, x, y, z, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D);
            this.noiseData2 = this.noiseGen1.generateNoiseOctaves(this.noiseData2, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D);
            this.noiseData3 = this.noiseGen2.generateNoiseOctaves(this.noiseData3, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D);
            boolean flag1 = false;
            boolean flag = false;
            int l = 0;
            int i1 = 0;
            double d4 = 8.5D;
            
            for(int j1 = 0; j1 < 5; ++j1)
            {
            for(int k1 = 0; k1 < 5; ++k1)
            {
            float f = 0.0F;
            float f1 = 0.0F;
            float f2 = 0.0F;
            byte b0 = 2;
            BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10];
            
            for(int l1 = -b0; l1 <= b0; ++l1)
            {
            for(int i2 = -b0; i2 <= b0; ++i2)
            {
            BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10];
            float f3 = biomegenbase1.minHeight;
            float f4 = biomegenbase1.maxHeight;
            
            float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F);
            
            if(biomegenbase1.minHeight > biomegenbase.minHeight)
            {
            f5 /= 2.0F;
            }
            
            f += f4 * f5;
            f1 += f3 * f5;
            f2 += f5;
            }
            }
            
            f /= f2;
            f1 /= f2;
            f = f * 0.9F + 0.1F;
            f1 = (f1 * 4.0F - 1.0F) / 8.0F;
            double d13 = this.noiseData4[i1] / 8000.0D;
            
            if(d13 < 0.0D)
            {
            d13 = -d13 * 0.3D;
            }
            
            d13 = d13 * 3.0D - 2.0D;
            
            if(d13 < 0.0D)
            {
            d13 /= 2.0D;
            
            if(d13 < -1.0D)
            {
            d13 = -1.0D;
            }
            
            d13 /= 1.4D;
            d13 /= 2.0D;
            }
            else
            {
            if(d13 > 1.0D)
            {
            d13 = 1.0D;
            }
            
            d13 /= 8.0D;
            }
            
            ++i1;
            double d12 = (double)f1;
            double d14 = (double)f;
            d12 += d13 * 0.2D;
            d12 = d12 * 8.5D / 8.0D;
            double d5 = 8.5D + d13 * 4.0D;
            
            for(int j2 = 0; j2 < 33; ++j2)
            {
            double d6 = ((double)j2 - d5) * 12.0D * 128.0D / 256.0D / d14;
            
            if(d6 < 0.0D)
            {
            d6 *= 4.0D;
            }
            
            double d7 = this.noiseData2[l] / 512.0D;
            double d8 = this.noiseData3[l] / 512.0D;
            double d9 = (this.noiseData1[l] / 10.0D + 1.0D) / 2.0D;
            double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6;
            
            if(j2 > 29)
            {
            double d11 = (double)((float)(j2 - 29) / 3.0F);
            d10 = d10 * (1.0D - d11) + -10.0D * d11;
            }
            
            this.noiseArray[l] = d10;
            ++l;
            }
            }
            }
            }
            
            public boolean chunkExists(int par1, int par2)
            {
            return true;
            }
            
            public void populate(IChunkProvider chunk, int x, int z)
            {
            BlockFalling.fallInstantly = true;
            int k = x * 16;
            int l = z * 16;
            BlockPos blockpos = new BlockPos(k, 0, l);
            BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos.add(16, 0, 16));
            this.rand.setSeed(this.worldObj.getSeed());
            long i1 = this.rand.nextLong() / 2L * 2L + 1L;
            long j1 = this.rand.nextLong() / 2L * 2L + 1L;
            this.rand.setSeed((long)x * i1 + (long)z * j1 ^ this.worldObj.getSeed());
            boolean flag = false;
            ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(x, z);
            
            MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(chunk, worldObj, rand, x, z, flag));
            //TODO
            if(this.mapFeaturesEnabled)
            {
            this.scatteredFeatureGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
            }
            int k1;
            int l1;
            int i2;
            //TODO
            //if(this.settings.useDungeons)
            //{
            boolean doGen = TerrainGen.populate(chunk, worldObj, rand, x, z, flag, DUNGEON);
            for(k1 = 0; doGen && k1 < this.settings.dungeonChance; ++k1)
            {
            l1 = this.rand.nextInt(16) + 8;
            i2 = this.rand.nextInt(256);
            int j2 = this.rand.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.rand, blockpos.add(l1, i2, j2));
            }
            //}
            
            biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
            if(TerrainGen.populate(chunk, worldObj, rand, x, z, flag, ANIMALS))
            {
            SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
            }
            blockpos = blockpos.add(8, 0, 8);
            
            boolean doGen1 = TerrainGen.populate(chunk, worldObj, rand, x, z, flag, ICE);
            for(k1 = 0; doGen1 && k1 < 16; ++k1)
            {
            for(l1 = 0; l1 < 16; ++l1)
            {
            BlockPos blockpos1 = this.worldObj.getPrecipitationHeight(blockpos.add(k1, 0, l1));
            BlockPos blockpos2 = blockpos1.down();
            
            if(this.worldObj.func_175675_v(blockpos2))
            {
            this.worldObj.setBlockState(blockpos2, Blocks.ice.getDefaultState(), 2);
            }
            
            if(this.worldObj.canSnowAt(blockpos1, true))
            {
            this.worldObj.setBlockState(blockpos1, Blocks.snow_layer.getDefaultState(), 2);
            }
            }
            }
            
            MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(chunk, worldObj, rand, x, z, flag));
            
            BlockFalling.fallInstantly = false;
            }
            
            public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
            {
            return true;
            }
            
            public void saveExtraData()
            {}
            
            public boolean unloadQueuedChunks()
            {
            return false;
            }
            
            public boolean canSave()
            {
            return true;
            }
            
            public String makeString()
            {
            return "FrightfulLevelSource";
            }
            
            public List func_177458_a(EnumCreatureType p_177458_1_, BlockPos p_177458_2_)
            { //TODO
            BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(p_177458_2_);
            return biomegenbase.getSpawnableList(p_177458_1_);
            }
            
            public int getLoadedChunkCount()
            {
            return 0;
            }
            
            //TODO
            
            @Override
            public Chunk provideChunk(BlockPos blockPosIn)
            {
            return this.provideChunk(blockPosIn.getX() >> 4, blockPosIn.getZ() >> 4);
            }
            
            @Override
            public BlockPos getStrongholdGen(World worldIn, String p_180513_2_, BlockPos p_180513_3_)
            {
            return null;
            }
            
            @Override
            public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
            {
            Iterator iterator = this.structureGenerators.iterator();
            
            while(iterator.hasNext())
            {
            MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
            mapgenstructure.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
            }
            }
            }
            

            Regarde avec ça, je t’ai mis des TODO pour que tu voies ou j’ai modifier et que tu cherche dessus.

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

              Salut
              (Désolé pour le temps de la réponse)
              J’ai toujours un crash, mais j’ai l’impression que ce n’est plus le même. Le voici :

              [13:34:32] [Server thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Exception generating new chunk
              java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Exception generating new chunk
              at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_51]
              at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_51]
              at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:715) [FMLCommonHandler.class:?]
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:727) [MinecraftServer.class:?]
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [MinecraftServer.class:?]
              at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [IntegratedServer.class:?]
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
              at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
              Caused by: net.minecraft.util.ReportedException: Exception generating new chunk
              at net.minecraft.entity.Entity.moveEntity(Entity.java:857) ~[Entity.class:?]
              at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:381) ~[NetHandlerPlayServer.class:?]
              at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:36) ~[C03PacketPlayer.class:?]
              at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:154) ~[C03PacketPlayer$C04PacketPlayerPosition.class:?]
              at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_51]
              at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_51]
              at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?]
              … 5 more
              Caused by: java.lang.NullPointerException
              at This_is_Halloween.Frightful.WorldChunkManagerFrightful.getBiomesForGeneration(WorldChunkManagerFrightful.java:136) ~[WorldChunkManagerFrightful.class:?]
              at This_is_Halloween.Frightful.ChunkProviderFrightful.setBlocksInChunk(ChunkProviderFrightful.java:201) ~[ChunkProviderFrightful.class:?]
              at This_is_Halloween.Frightful.ChunkProviderFrightful.provideChunk(ChunkProviderFrightful.java:183) ~[ChunkProviderFrightful.class:?]
              at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:178) ~[ChunkProviderServer.class:?]
              at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:138) ~[ChunkProviderServer.class:?]
              at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:108) ~[ChunkProviderServer.class:?]
              at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:209) ~[ChunkProviderServer.class:?]
              at net.minecraft.world.World.getChunkFromChunkCoords(World.java:360) ~[World.class:?]
              at net.minecraft.world.World.getChunkFromBlockCoords(World.java:349) ~[World.class:?]
              at net.minecraft.world.World.getBlockState(World.java:902) ~[World.class:?]
              at This_is_Halloween.Frightful.TeleporterFrightful.placeInExistingPortal(TeleporterFrightful.java:113) ~[TeleporterFrightful.class:?]
              at This_is_Halloween.Frightful.TeleporterFrightful.placeInPortal(TeleporterFrightful.java:47) ~[TeleporterFrightful.class:?]
              at net.minecraft.server.management.ServerConfigurationManager.transferEntityToWorld(ServerConfigurationManager.java:670) ~[ServerConfigurationManager.class:?]
              at net.minecraft.server.management.ServerConfigurationManager.transferPlayerToDimension(ServerConfigurationManager.java:576) ~[ServerConfigurationManager.class:?]
              at This_is_Halloween.Block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:225) ~[BlockPortalFrightful.class:?]
              at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:924) ~[Entity.class:?]
              at net.minecraft.entity.Entity.moveEntity(Entity.java:850) ~[Entity.class:?]
              at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:381) ~[NetHandlerPlayServer.class:?]
              at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:36) ~[C03PacketPlayer.class:?]
              at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:154) ~[C03PacketPlayer$C04PacketPlayerPosition.class:?]
              at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_51]
              at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_51]
              at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?]
              … 5 more
              [13:34:32] [Server thread/INFO]: Stopping server
              [13:34:32] [Server thread/INFO]: Saving players
              [13:34:32] [Server thread/INFO]: Saving worlds
              [13:34:32] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
              [13:34:32] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
              [13:34:32] [Server thread/INFO]: Saving chunks for level 'New World'/The End
              [13:34:32] [Server thread/INFO]: Saving chunks for level 'New World'/Frightful
              [13:34:33] [Server thread/INFO] [FML]: Unloading dimension 0
              [13:34:33] [Server thread/INFO] [FML]: Unloading dimension -1
              [13:34:33] [Server thread/INFO] [FML]: Unloading dimension 1
              [13:34:33] [Server thread/INFO] [FML]: Unloading dimension -5
              [13:34:33] [Server thread/INFO] [FML]: Applying holder lookups
              [13:34:33] [Server thread/INFO] [FML]: Holder lookups applied
              [13:34:33] [Client thread/FATAL]: Reported exception thrown!
              net.minecraft.util.ReportedException: Getting biome
              at net.minecraft.world.World.getBiomeGenForCoordsBody(World.java:210) ~[World.class:?]
              at net.minecraft.world.WorldProvider.getBiomeGenForCoords(WorldProvider.java:429) ~[WorldProvider.class:?]
              at net.minecraft.world.World.getBiomeGenForCoords(World.java:185) ~[World.class:?]
              at net.minecraftforge.client.ForgeHooksClient.getSkyBlendColour(ForgeHooksClient.java:388) ~[ForgeHooksClient.class:?]
              at net.minecraft.world.World.getSkyColorBody(World.java:1531) ~[World.class:?]
              at net.minecraft.world.WorldProvider.getSkyColor(WorldProvider.java:463) ~[WorldProvider.class:?]
              at net.minecraft.world.World.getSkyColor(World.java:1518) ~[World.class:?]
              at net.minecraft.client.renderer.EntityRenderer.updateFogColor(EntityRenderer.java:1757) ~[EntityRenderer.class:?]
              at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1277) ~[EntityRenderer.class:?]
              at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) ~[EntityRenderer.class:?]
              at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1088) ~[EntityRenderer.class:?]
              at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1115) ~[Minecraft.class:?]
              at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]
              at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
              at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
              at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
              at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
              at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
              at GradleStart.main(Unknown Source) [start/:?]
              Caused by: java.lang.NullPointerException
              at This_is_Halloween.Frightful.WorldChunkManagerFrightful.getRainfall(WorldChunkManagerFrightful.java:89) ~[WorldChunkManagerFrightful.class:?]
              at net.minecraft.world.biome.BiomeCache$Block.<init>(BiomeCache.java:105) ~[BiomeCache$Block.class:?]
              at net.minecraft.world.biome.BiomeCache.getBiomeCacheBlock(BiomeCache.java:37) ~[BiomeCache.class:?]
              at net.minecraft.world.biome.BiomeCache.func_180284_a(BiomeCache.java:48) ~[BiomeCache.class:?]
              at This_is_Halloween.Frightful.WorldChunkManagerFrightful.func_180300_a(WorldChunkManagerFrightful.java:273) ~[WorldChunkManagerFrightful.class:?]
              at net.minecraft.world.chunk.Chunk.getBiome(Chunk.java:1442) ~[Chunk.class:?]
              at net.minecraft.world.World.getBiomeGenForCoordsBody(World.java:196) ~[World.class:?]
              … 21 more
              

              C’est toujours un problème dans la génération d’un nouveau chunk.
              L’erreur reporte à cette ligne dans WorldChunkManagerFrightful :

              **%(#7f0055)[[size=small]int]**[] %(#6a3e3e)[[size=small]aint] = **%(#7f0055)[[size=small]this]**.%(#0000c0)[[size=small]GenBiomes].getInts(%(#6a3e3e)[[size=small]p_76937_2_], %(#6a3e3e)[[size=small]p_76937_3_], %(#6a3e3e)[[size=small]p_76937_4_], %(#6a3e3e)[[size=small]p_76937_5_]);
              

              (dans la méthode getBiomesForGeneration)
              et à ces lignes dans ChunkProviderFrightful :

              **%(#7f0055)[[size=small]this]**.%(#0000c0)[[size=small]biomesForGeneration] = **%(#7f0055)[[size=small]this]**.%(#0000c0)[[size=small]worldObj].getWorldChunkManager().getBiomesForGeneration(**%(#7f0055)[[size=small]this]**.%(#0000c0)[[size=small]biomesForGeneration], %(#6a3e3e)[[size=small]p_180518_1_] * 4 - 2, %(#6a3e3e)[[size=small]p_180518_2_] * 4 - 2, 10, 10);
              

              (dans la méthode setBlocksInChunk)

              **%(#7f0055)[[size=small]this]**.setBlocksInChunk(%(#6a3e3e)[[size=small]x], %(#6a3e3e)[[size=small]z], %(#6a3e3e)[[size=small]chunkprimer]);
              

              (dans la méthode provideChunk)</init>

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

                Un petit up pour mon problème de dimension. J’ai encore cherché, mais rien trouvé

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

                  tu utilise bien la classe de ton biome dans le chunk provider ?

                  edit : fait gaffe à la convention java. Regarde avec ce code :

                  package This_is_Halloween.Frightful;
                  
                  import static net.minecraft.world.biome.BiomeGenBase.forest;
                  import static net.minecraft.world.biome.BiomeGenBase.forestHills;
                  import static net.minecraft.world.biome.BiomeGenBase.jungle;
                  import static net.minecraft.world.biome.BiomeGenBase.jungleHills;
                  import static net.minecraft.world.biome.BiomeGenBase.plains;
                  import static net.minecraft.world.biome.BiomeGenBase.taiga;
                  import static net.minecraft.world.biome.BiomeGenBase.taigaHills;
                  
                  import java.util.ArrayList;
                  import java.util.Arrays;
                  import java.util.List;
                  import java.util.Random;
                  
                  import com.google.common.collect.Lists;
                  
                  import net.minecraft.crash.CrashReport;
                  import net.minecraft.crash.CrashReportCategory;
                  import net.minecraft.util.BlockPos;
                  import net.minecraft.util.ReportedException;
                  import net.minecraft.world.World;
                  import net.minecraft.world.WorldType;
                  import net.minecraft.world.biome.BiomeCache;
                  import net.minecraft.world.biome.BiomeGenBase;
                  import net.minecraft.world.biome.WorldChunkManager;
                  import net.minecraft.world.gen.layer.GenLayer;
                  import net.minecraft.world.gen.layer.IntCache;
                  import net.minecraftforge.common.MinecraftForge;
                  import net.minecraftforge.event.terraingen.WorldTypeEvent;
                  import net.minecraftforge.fml.relauncher.Side;
                  import net.minecraftforge.fml.relauncher.SideOnly;
                  
                  public class WorldChunkManagerFrightful extends WorldChunkManager {
                  
                  private GenLayer GenBiomes;
                  private GenLayer BiomeIndexLayer;
                  private BiomeCache BiomeCache;
                  private List <biomegenbase>BiomesToSpawnIn;
                  
                  public WorldChunkManagerFrightful()
                  {
                  this.BiomeCache = new BiomeCache(this);
                  this.BiomesToSpawnIn = new ArrayList<biomegenbase>();
                  this.BiomesToSpawnIn.add(This_is_Halloween.This_is_Halloween.Evilland);
                  }
                  
                  public WorldChunkManagerFrightful(long seed, WorldType worldtype, String string)
                  {
                  this();
                  GenLayer[] agenlayer = GenLayerFrightful.makeTheWorld(seed);
                  this.GenBiomes = agenlayer[0];
                  this.BiomeIndexLayer = agenlayer[1];
                  }
                  
                  public WorldChunkManagerFrightful(World world)
                  {
                        this(world.getSeed(), world.getWorldInfo().getTerrainType());
                  }
                  
                  public List <biomegenbase>getBiomesToSpawnIn()
                  {
                  return this.BiomesToSpawnIn;
                  }
                  
                  public BiomeGenBase getBiomeGenAt(int x, int z)
                  {
                  BiomeGenBase biome = this.BiomeCache.func_180284_a(x, z, BiomeGenBase);
                  if(biome == null)
                  {
                  return This_is_Halloween.This_is_Halloween.Evilland;
                  }
                  return biome;
                  }
                  
                    public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length)
                    {
                         if(listToReuse == null || listToReuse.length < width * length)
                         {
                             listToReuse = new float[width * length];
                         }
                  
                         Arrays.fill(listToReuse, 0, width * length, 0.0F);
                         return listToReuse;
                    }
                  
                  @SideOnly(Side.CLIENT)
                  public float getTemperatureAtHeight(float par1, int par2)
                  {
                  return par1;
                  }
                  
                    public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
                    {      
                  IntCache.resetIntCache();
                  
                         if(par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
                         {
                             par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
                         }
                  
                         int[] aint = this.GenBiomes.getInts(par2, par3, par4, par5);
                  
                         for(int i = 0; i < par4 * par5; ++i)
                         {
                             if(aint* >= 0)
                             {
                                 par1ArrayOfBiomeGenBase* = BiomeGenBase.getBiome(aint*);
                             }
                             else
                             {
                                 par1ArrayOfBiomeGenBase* = TaClass.tonBiome.
                  }
                         }
                  
                         return par1ArrayOfBiomeGenBase;
                    }
                  
                    public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth)
                    {
                        return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
                    }
                  
                    public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int z, int width, int length, boolean cacheFlag)
                  {
                  
                  IntCache.resetIntCache();
                  
                        if (listToReuse == null || listToReuse.length < width * length)
                        {
                            listToReuse = new BiomeGenBase[width * length];
                        }
                  
                        if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0)
                        {
                            BiomeGenBase[] abiomegenbase1 = this.BiomeCache.getCachedBiomes(x, z);
                            System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
                            return listToReuse;
                        }
                        else
                        {
                            int[] aint = this.BiomeIndexLayer.getInts(x, z, width, length);
                  
                             for(int i1 = 0; i1 < width * length; ++i1)
                             {
                                 if(aint[i1] >= 0)
                                 {
                                     listToReuse[i1] = BiomeGenBase.getBiome(aint[i1]);
                                 }
                                 else
                                 {
                                     listToReuse[i1] = TaClass.tonBiome;
                                 }
                             }
                  
                             return listToReuse;
                        }
                  }
                  public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
                    {
                        IntCache.resetIntCache();
                         int l = par1 - par3 >> 2;
                         int i1 = par2 - par3 >> 2;
                         int j1 = par1 + par3 >> 2;
                         int k1 = par2 + par3 >> 2;
                         int l1 = j1 - l + 1;
                         int i2 = k1 - i1 + 1;
                         int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                  
                         for(int j2 = 0; j2 < l1 * i2; ++j2)
                         {
                             BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);
                  
                             if(!par4List.contains(biomegenbase))
                             {
                                 return false;
                             }
                         }
                  
                         return true;
                    }
                  public BlockPos findBiomePosition(int x, int z, int range, List list, Random random)
                  {
                        IntCache.resetIntCache();
                         int l = x - range >> 2;
                         int i1 = z - range >> 2;
                         int j1 = x + range >> 2;
                         int k1 = z + range >> 2;
                         int l1 = j1 - l + 1;
                         int i2 = k1 - i1 + 1;
                         int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                         BlockPos blockpos = null;
                         int j2 = 0;
                  
                         for(int k2 = 0; k2 < l1 * i2; ++k2)
                         {
                             int l2 = l + k2 % l1 << 2;
                             int i3 = i1 + k2 / l1 << 2;
                             BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);
                  
                             if(biomes.contains(biomegenbase) && (blockpos == null || random.nextInt(j2 + 1) == 0))
                             {
                                 blockpos = new BlockPos(l2, 0, i3);
                                 ++j2;
                             }
                         }
                  
                         return blockpos;
                  }
                  
                  public void cleanupCache()
                  {
                  this.BiomeCache.cleanupCache();
                  }
                  
                  }
                  
                  

                  regarde avec ce code. Il peut y avoir des erreus (pas importante mais…), j’ai utilisé un simple éditeur de texte.</biomegenbase></biomegenbase></biomegenbase>

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

                    Toujours la même erreur, je ne comprend pas :

                    [14:03:41] [Server thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Exception generating new chunk
                    java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Exception generating new chunk
                    at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_51]
                    at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_51]
                    at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:715) [FMLCommonHandler.class:?]
                    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:727) [MinecraftServer.class:?]
                    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [MinecraftServer.class:?]
                    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [IntegratedServer.class:?]
                    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
                    at java.lang.Thread.run(Unknown Source) [?:1.8.0_51]
                    Caused by: net.minecraft.util.ReportedException: Exception generating new chunk
                    at net.minecraft.entity.Entity.moveEntity(Entity.java:857) ~[Entity.class:?]
                    at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:381) ~[NetHandlerPlayServer.class:?]
                    at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:36) ~[C03PacketPlayer.class:?]
                    at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:154) ~[C03PacketPlayer$C04PacketPlayerPosition.class:?]
                    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
                    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_51]
                    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_51]
                    at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?]
                    … 5 more
                    Caused by: java.lang.NullPointerException
                    at This_is_Halloween.Frightful.WorldChunkManagerFrightful.getBiomesForGeneration(WorldChunkManagerFrightful.java:101) ~[WorldChunkManagerFrightful.class:?]
                    at This_is_Halloween.Frightful.ChunkProviderFrightful.setBlocksInChunk(ChunkProviderFrightful.java:202) ~[ChunkProviderFrightful.class:?]
                    at This_is_Halloween.Frightful.ChunkProviderFrightful.provideChunk(ChunkProviderFrightful.java:184) ~[ChunkProviderFrightful.class:?]
                    at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:178) ~[ChunkProviderServer.class:?]
                    at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:138) ~[ChunkProviderServer.class:?]
                    at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:108) ~[ChunkProviderServer.class:?]
                    at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:209) ~[ChunkProviderServer.class:?]
                    at net.minecraft.world.World.getChunkFromChunkCoords(World.java:360) ~[World.class:?]
                    at net.minecraft.world.World.getChunkFromBlockCoords(World.java:349) ~[World.class:?]
                    at net.minecraft.world.World.getBlockState(World.java:902) ~[World.class:?]
                    at This_is_Halloween.Frightful.TeleporterFrightful.placeInExistingPortal(TeleporterFrightful.java:113) ~[TeleporterFrightful.class:?]
                    at This_is_Halloween.Frightful.TeleporterFrightful.placeInPortal(TeleporterFrightful.java:47) ~[TeleporterFrightful.class:?]
                    at net.minecraft.server.management.ServerConfigurationManager.transferEntityToWorld(ServerConfigurationManager.java:670) ~[ServerConfigurationManager.class:?]
                    at net.minecraft.server.management.ServerConfigurationManager.transferPlayerToDimension(ServerConfigurationManager.java:576) ~[ServerConfigurationManager.class:?]
                    at This_is_Halloween.Block.BlockPortalFrightful.onEntityCollidedWithBlock(BlockPortalFrightful.java:225) ~[BlockPortalFrightful.class:?]
                    at net.minecraft.entity.Entity.doBlockCollisions(Entity.java:924) ~[Entity.class:?]
                    at net.minecraft.entity.Entity.moveEntity(Entity.java:850) ~[Entity.class:?]
                    at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:381) ~[NetHandlerPlayServer.class:?]
                    at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:36) ~[C03PacketPlayer.class:?]
                    at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.processPacket(C03PacketPlayer.java:154) ~[C03PacketPlayer$C04PacketPlayerPosition.class:?]
                    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
                    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_51]
                    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_51]
                    at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?]
                    … 5 more
                    [14:03:42] [Server thread/INFO]: Stopping server
                    [14:03:42] [Server thread/INFO]: Saving players
                    [14:03:42] [Server thread/INFO]: Saving worlds
                    [14:03:42] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
                    [14:03:42] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
                    [14:03:42] [Server thread/INFO]: Saving chunks for level 'New World'/The End
                    [14:03:42] [Server thread/INFO]: Saving chunks for level 'New World'/Frightful
                    [14:03:42] [Server thread/INFO] [FML]: Unloading dimension 0
                    [14:03:42] [Server thread/INFO] [FML]: Unloading dimension -1
                    [14:03:42] [Server thread/INFO] [FML]: Unloading dimension 1
                    [14:03:42] [Server thread/INFO] [FML]: Unloading dimension -5
                    [14:03:42] [Server thread/INFO] [FML]: Applying holder lookups
                    [14:03:42] [Server thread/INFO] [FML]: Holder lookups applied
                    [14:03:42] [Client thread/FATAL]: Reported exception thrown!
                    net.minecraft.util.ReportedException: Getting biome
                    at net.minecraft.world.World.getBiomeGenForCoordsBody(World.java:210) ~[World.class:?]
                    at net.minecraft.world.WorldProvider.getBiomeGenForCoords(WorldProvider.java:429) ~[WorldProvider.class:?]
                    at net.minecraft.world.World.getBiomeGenForCoords(World.java:185) ~[World.class:?]
                    at net.minecraftforge.client.ForgeHooksClient.getSkyBlendColour(ForgeHooksClient.java:388) ~[ForgeHooksClient.class:?]
                    at net.minecraft.world.World.getSkyColorBody(World.java:1531) ~[World.class:?]
                    at net.minecraft.world.WorldProvider.getSkyColor(WorldProvider.java:463) ~[WorldProvider.class:?]
                    at net.minecraft.world.World.getSkyColor(World.java:1518) ~[World.class:?]
                    at net.minecraft.client.renderer.EntityRenderer.updateFogColor(EntityRenderer.java:1757) ~[EntityRenderer.class:?]
                    at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1277) ~[EntityRenderer.class:?]
                    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) ~[EntityRenderer.class:?]
                    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1088) ~[EntityRenderer.class:?]
                    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1115) ~[Minecraft.class:?]
                    at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]
                    at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_51]
                    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_51]
                    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                    at GradleStart.main(Unknown Source) [start/:?]
                    Caused by: java.lang.NullPointerException
                    at This_is_Halloween.Frightful.WorldChunkManagerFrightful.getBiomeGenAt(WorldChunkManagerFrightful.java:141) ~[WorldChunkManagerFrightful.class:?]
                    at net.minecraft.world.biome.BiomeCache$Block.<init>(BiomeCache.java:106) ~[BiomeCache$Block.class:?]
                    at net.minecraft.world.biome.BiomeCache.getBiomeCacheBlock(BiomeCache.java:37) ~[BiomeCache.class:?]
                    at net.minecraft.world.biome.BiomeCache.func_180284_a(BiomeCache.java:48) ~[BiomeCache.class:?]
                    at net.minecraft.world.biome.WorldChunkManager.func_180300_a(WorldChunkManager.java:75) ~[WorldChunkManager.class:?]
                    at net.minecraft.world.chunk.Chunk.getBiome(Chunk.java:1442) ~[Chunk.class:?]
                    at net.minecraft.world.World.getBiomeGenForCoordsBody(World.java:196) ~[World.class:?]
                    … 21 more
                    

                    Je tiens aussi à préciser (peut être rien avoir mais …) que le chunkProvider n’utilisait pas mon biome. J’ai donc ajouté ce code :

                    **[size=smallpublic]** **[size=smallvoid]** replaceBlocksForBiome(**[size=smallint]** [size=smallcoordX], **[size=smallint]** [size=smallcoordZ], ChunkPrimer [size=smallchunkprimer], **[size=smallbyte]**[] [size=smallarrayOfByte], BiomeGenBase[] [size=smallbiomeList])
                    {
                    World [size=smallworld] = **[size=smallnull]**;
                    ChunkProviderEvent.ReplaceBiomeBlocks [size=smallevent] = **[size=smallnew]** ChunkProviderEvent.ReplaceBiomeBlocks(**[size=smallthis]**, [size=smallcoordX], [size=smallcoordZ], [size=smallchunkprimer], [size=smallworld]);
                    MinecraftForge.***[size=smallEVENT_BUS]***.post([size=smallevent]);
                    **[size=smallif]** ([size=smallevent].getResult() == Result.***[size=smallDENY]***) **[size=smallreturn]**;
                    
                    **[size=smalldouble]** [size=smalld0] = 0.03125D;
                    **[size=smallthis]**.[size=smallstoneNoise] = **[size=smallthis]**.[size=smallnoiseGen4].func_151599_a(**[size=smallthis]**.[size=smallstoneNoise], (**[size=smalldouble]**)([size=smallcoordX] * 16), (**[size=smalldouble]**)([size=smallcoordZ] * 16), 16, 16, [size=smalld0] * 2.0D, [size=smalld0] * 2.0D, 1.0D);
                    
                    **[size=smallfor]** (**[size=smallint]** [size=smallk] = 0; [size=smallk] < 16; ++[size=smallk])
                    {
                    **[size=smallfor]** (**[size=smallint]** [size=smalll] = 0; [size=smalll] < 16; ++[size=smalll])
                    {
                    BiomeGenPlains [size=small/*]**[size=smallTODO]**[size=small *ce* *biome* *est* a *remplacer* par *le* *votre**/] [size=smallbiomegenbase] = (BiomeGenPlains)[size=smallbiomeList][[size=smalll] + [size=smallk] * 16];
                    [size=smallbiomegenbase].genTerrainBlocks(**[size=smallthis]**.[size=smallworldObj], **[size=smallthis]**.[size=smallrand], [size=smallchunkprimer], [size=smallcoordX] * 16 + [size=smallk], [size=smallcoordZ] * 16 + [size=smalll], **[size=smallthis]**.[size=smallstoneNoise][[size=smalll] + [size=smallk] * 16]);
                    }
                    }
                    }
                    
                    

                    J’ai mis la plains pour être sûr que c’est bien le monde qui bug, et non le biome
                    Je ne sais pas si c’est ça qui bug, mais je ne pense pas. Dans le crash, ca réfère toujours cette ligne :

                    **[size=smallint]**[] [size=smallaint] = **[size=smallthis]**.[size=smallBiomeIndexLayer].getInts([size=smallx], [size=smallz], [size=smallwidth], [size=smalllength]);
                    
                    

                    Voilà, si vous savez comment faire, parce que moi je déséspère :-/</init>

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

                      si tu met BiomeGenPlains il faut le replacer partous ou tu as une référence à ton biome attention.

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

                        C’est déjà fait

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

                          tu peux renvoyer le code en entier ?

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

                            package This_is_Halloween.Frightful;
                            
                            import static net.minecraft.world.biome.BiomeGenBase.forest;
                            import static net.minecraft.world.biome.BiomeGenBase.forestHills;
                            import static net.minecraft.world.biome.BiomeGenBase.jungle;
                            import static net.minecraft.world.biome.BiomeGenBase.jungleHills;
                            import static net.minecraft.world.biome.BiomeGenBase.plains;
                            import static net.minecraft.world.biome.BiomeGenBase.taiga;
                            import static net.minecraft.world.biome.BiomeGenBase.taigaHills;
                            import java.util.ArrayList;
                            import java.util.Arrays;
                            import java.util.List;
                            import java.util.Random;
                            import com.google.common.collect.Lists;
                            import net.minecraft.crash.CrashReport;
                            import net.minecraft.crash.CrashReportCategory;
                            import net.minecraft.util.BlockPos;
                            import net.minecraft.util.ReportedException;
                            import net.minecraft.world.World;
                            import net.minecraft.world.WorldType;
                            import net.minecraft.world.biome.BiomeCache;
                            import net.minecraft.world.biome.BiomeGenBase;
                            import net.minecraft.world.biome.WorldChunkManager;
                            import net.minecraft.world.gen.layer.GenLayer;
                            import net.minecraft.world.gen.layer.IntCache;
                            import net.minecraftforge.common.MinecraftForge;
                            import net.minecraftforge.event.terraingen.WorldTypeEvent;
                            import net.minecraftforge.fml.relauncher.Side;
                            import net.minecraftforge.fml.relauncher.SideOnly;
                            
                            public class WorldChunkManagerFrightful extends WorldChunkManager {
                            
                            private BiomeGenBase biomegenbase;
                            private GenLayer GenBiomes;
                            private GenLayer BiomeIndexLayer;
                            private BiomeCache BiomeCache;
                            private List <biomegenbase>BiomesToSpawnIn;
                            private List <biomegenbase>biomes;
                               private static String field_180301_f;
                            
                            public WorldChunkManagerFrightful()
                            {
                            this.BiomeCache = new BiomeCache(this);
                            this.BiomesToSpawnIn = new ArrayList<biomegenbase>();
                            this.BiomesToSpawnIn.add(BiomeGenBase.plains);
                            }
                            
                            public WorldChunkManagerFrightful(long seed, WorldType worldtype, String string)
                            {
                            this();
                            GenLayer[] agenlayer = GenLayerFrightful.makeTheWorld(seed);
                            this.GenBiomes = agenlayer[0];
                            this.BiomeIndexLayer = agenlayer[1];
                            }
                            
                            public WorldChunkManagerFrightful(World world)
                            {
                            this(world.getSeed(), world.getWorldInfo().getTerrainType(), field_180301_f);
                            }
                            
                            public List <biomegenbase>getBiomesToSpawnIn()
                            {
                            return this.BiomesToSpawnIn;
                            }
                            
                            public BiomeGenBase getBiomeGenAt(int x, int z)
                            {
                            BiomeGenBase biome = this.BiomeCache.func_180284_a(x, z, biomegenbase);
                            if(biome == null)
                            {
                            return BiomeGenBase.plains;
                            }
                            return biome;
                            }
                            
                            public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length)
                            {
                            if(listToReuse == null || listToReuse.length < width * length)
                            {
                            listToReuse = new float[width * length];
                            }
                            Arrays.fill(listToReuse, 0, width * length, 0.0F);
                            return listToReuse;
                            }
                            
                            @SideOnly(Side.CLIENT)
                            public float getTemperatureAtHeight(float par1, int par2)
                            {
                            return par1;
                            
                            }
                            
                            public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
                            {      
                            IntCache.resetIntCache();
                            
                            if(par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
                            {
                            par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
                            }
                            int[] aint = this.GenBiomes.getInts(par2, par3, par4, par5);
                            
                            for(int i = 0; i < par4 * par5; ++i)
                            {
                            if(aint* >= 0)
                            {
                            par1ArrayOfBiomeGenBase* = BiomeGenBase.getBiome(aint*);
                            }
                            else
                            
                            {
                            par1ArrayOfBiomeGenBase* = BiomeGenBase.plains;
                            }
                            
                            }
                            return par1ArrayOfBiomeGenBase;
                            }
                            
                            public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth)
                            {
                            return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
                            }
                            
                            public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int z, int width, int length, boolean cacheFlag)
                            {
                            IntCache.resetIntCache();
                            
                            if (listToReuse == null || listToReuse.length < width * length)
                            {
                            listToReuse = new BiomeGenBase[width * length];
                            }
                            
                            if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0)
                            {
                            BiomeGenBase[] abiomegenbase1 = this.BiomeCache.getCachedBiomes(x, z);
                            System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
                            return listToReuse;
                            }
                            else
                            {
                            int[] aint = this.BiomeIndexLayer.getInts(x, z, width, length);
                            
                            for(int i1 = 0; i1 < width * length; ++i1)
                            {
                            if(aint[i1] >= 0)
                            {
                            listToReuse[i1] = BiomeGenBase.getBiome(aint[i1]);
                            }
                            else
                            {
                            listToReuse[i1] = BiomeGenBase.plains;
                            }
                            }
                            return listToReuse;
                            }
                            }
                            
                            public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
                            {
                            IntCache.resetIntCache();
                            int l = par1 - par3 >> 2;
                            int i1 = par2 - par3 >> 2;
                            int j1 = par1 + par3 >> 2;
                            int k1 = par2 + par3 >> 2;
                            int l1 = j1 - l + 1;
                            int i2 = k1 - i1 + 1;
                            int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                            
                            for(int j2 = 0; j2 < l1 * i2; ++j2)
                            {
                            BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);
                            
                            if(!par4List.contains(biomegenbase))
                            {
                            return false;
                            }
                            }
                            return true;
                            }
                            
                            public BlockPos findBiomePosition(int x, int z, int range, List list, Random random)
                            {
                            IntCache.resetIntCache();
                            int l = x - range >> 2;
                            int i1 = z - range >> 2;
                            int j1 = x + range >> 2;
                            int k1 = z + range >> 2;
                            int l1 = j1 - l + 1;
                            int i2 = k1 - i1 + 1;
                            int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                            BlockPos blockpos = null;
                            int j2 = 0;
                            for(int k2 = 0; k2 < l1 * i2; ++k2)
                            {
                            int l2 = l + k2 % l1 << 2;
                            int i3 = i1 + k2 / l1 << 2;
                            BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);
                            
                            if(biomes.contains(biomegenbase) && (blockpos == null || random.nextInt(j2 + 1) == 0))
                            {
                            blockpos = new BlockPos(l2, 0, i3);
                            ++j2;
                            }
                            }
                            return blockpos;
                            }
                            public void cleanupCache()
                            {
                            this.BiomeCache.cleanupCache();
                            }
                            }
                            ```</biomegenbase></biomegenbase></biomegenbase></biomegenbase>
                            1 réponse Dernière réponse Répondre Citer 0
                            • DiangleD Hors-ligne
                              Diangle
                              dernière édition par

                              Je parler de toute les classes ^^ car tu as du en modifier

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

                                Désolé, j’ai pas compris que c’était toutes. Les voici :
                                BiomeGenEvilland (le biome, pas utilisé pour l’instant) :

                                package This_is_Halloween.Frightful;
                                
                                import java.util.Random;
                                
                                import net.minecraft.block.state.IBlockState;
                                import net.minecraft.init.Blocks;
                                import net.minecraft.world.biome.BiomeGenBase;
                                import net.minecraft.world.gen.feature.WorldGenTrees;
                                import net.minecraft.world.gen.feature.WorldGenerator;
                                import This_is_Halloween.Entity.EntityEvilChicken;
                                import This_is_Halloween.Entity.EntityEvilCow;
                                import This_is_Halloween.Entity.EntityEvilPig;
                                import This_is_Halloween.Entity.EntityEvilSheep;
                                import This_is_Halloween.Entity.EntityGhost;
                                import This_is_Halloween.Entity.EntityMummy;
                                import This_is_Halloween.Entity.EntityVampire;
                                
                                public class BiomeGenEvilland extends BiomeGenBase{
                                
                                public BiomeGenEvilland(int par1) {
                                super(par1);
                                this.spawnableCreatureList.clear();
                                this.spawnableCaveCreatureList.clear();
                                this.spawnableMonsterList.clear();
                                this.spawnableWaterCreatureList.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.topBlock = Blocks.grass.getDefaultState();
                                this.fillerBlock = Blocks.dirt.getDefaultState();
                                this.theBiomeDecorator.treesPerChunk = 5;
                                this.theBiomeDecorator.generateLakes = true;
                                this.theBiomeDecorator.grassPerChunk = 5;
                                this.theBiomeDecorator.flowersPerChunk = 4;
                                this.theBiomeDecorator.mushroomsPerChunk = 2;
                                this.theBiomeDecorator.reedsPerChunk = 2;
                                
                                }
                                public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
                                {
                                return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : new WorldGenTrees(false, 4, 0, 0, false));
                                }
                                }
                                
                                

                                BiomeGenLaayerFrightful :

                                package This_is_Halloween.Frightful;
                                
                                import net.minecraft.world.biome.BiomeGenBase;
                                import net.minecraft.world.gen.layer.GenLayer;
                                import net.minecraft.world.gen.layer.IntCache;
                                
                                public class BiomeGenLayerFrightful extends GenLayer {
                                
                                protected BiomeGenBase[] baseBiomes = {BiomeGenBase.plains};
                                
                                public BiomeGenLayerFrightful(long seed)
                                {
                                super(seed);
                                }
                                
                                @Override
                                public int[] getInts(int x, int z, int width, int depth)
                                {
                                int[] dest = IntCache.getIntCache(width * depth);
                                
                                for(int dz = 0; dz < depth; dz++)
                                {
                                for(int dx = 0; dx < width; dx++)
                                {
                                this.initChunkSeed(dx + x, dz + z);
                                dest[(dx + dz * width)] = this.baseBiomes[nextInt(this.baseBiomes.length)].biomeID;
                                }
                                }
                                return dest;
                                }
                                }
                                
                                

                                BiomeList (me demande à quoi sert cette classe) :

                                package This_is_Halloween.Frightful;
                                
                                public class BiomeList {
                                
                                public static void BiomeList()
                                {
                                
                                }
                                
                                }
                                
                                

                                ChunkProviderFrightful :

                                package This_is_Halloween.Frightful;
                                
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD;
                                import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE;
                                import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS;
                                import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON;
                                import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE;
                                import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE;
                                import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA;
                                
                                import java.util.Iterator;
                                import java.util.List;
                                import java.util.Random;
                                
                                import com.google.common.collect.Lists;
                                
                                import net.minecraft.block.Block;
                                import net.minecraft.block.BlockFalling;
                                import net.minecraft.block.state.IBlockState;
                                import net.minecraft.client.multiplayer.ChunkProviderClient;
                                import net.minecraft.entity.EnumCreatureType;
                                import net.minecraft.init.Blocks;
                                import net.minecraft.util.BlockPos;
                                import net.minecraft.util.IProgressUpdate;
                                import net.minecraft.util.MathHelper;
                                import net.minecraft.world.ChunkCoordIntPair;
                                import net.minecraft.world.SpawnerAnimals;
                                import net.minecraft.world.World;
                                import net.minecraft.world.WorldType;
                                import net.minecraft.world.biome.BiomeGenBase;
                                import net.minecraft.world.biome.BiomeGenPlains;
                                import net.minecraft.world.chunk.Chunk;
                                import net.minecraft.world.chunk.ChunkPrimer;
                                import net.minecraft.world.chunk.IChunkProvider;
                                import net.minecraft.world.gen.ChunkProviderEnd;
                                import net.minecraft.world.gen.ChunkProviderGenerate;
                                import net.minecraft.world.gen.ChunkProviderSettings;
                                import net.minecraft.world.gen.MapGenBase;
                                import net.minecraft.world.gen.MapGenCaves;
                                import net.minecraft.world.gen.MapGenRavine;
                                import net.minecraft.world.gen.NoiseGenerator;
                                import net.minecraft.world.gen.NoiseGeneratorOctaves;
                                import net.minecraft.world.gen.NoiseGeneratorPerlin;
                                import net.minecraft.world.gen.feature.WorldGenDungeons;
                                import net.minecraft.world.gen.feature.WorldGenLakes;
                                import net.minecraft.world.gen.structure.MapGenMineshaft;
                                import net.minecraft.world.gen.structure.MapGenScatteredFeature;
                                import net.minecraft.world.gen.structure.MapGenStronghold;
                                import net.minecraft.world.gen.structure.MapGenStructure;
                                import net.minecraft.world.gen.structure.MapGenVillage;
                                import net.minecraft.world.gen.structure.StructureOceanMonument;
                                import net.minecraftforge.common.MinecraftForge;
                                import net.minecraftforge.event.terraingen.ChunkProviderEvent;
                                import net.minecraftforge.event.terraingen.PopulateChunkEvent;
                                import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate;
                                import net.minecraftforge.event.terraingen.TerrainGen;
                                import net.minecraftforge.fml.common.eventhandler.Event.Result;
                                
                                public class ChunkProviderFrightful implements IChunkProvider{
                                
                                private Random rand;
                                private NoiseGeneratorOctaves noiseGen1;
                                private NoiseGeneratorOctaves noiseGen2;
                                private NoiseGeneratorOctaves noiseGen3;
                                private NoiseGeneratorPerlin noiseGen4;
                                public NoiseGeneratorOctaves noiseGen5;
                                public NoiseGeneratorOctaves noiseGen6;
                                public NoiseGeneratorOctaves mobSpawnerNoise;
                                private World worldObj;
                                   private Block field_177476_s;
                                private ChunkProviderSettings settings;
                                private WorldType worldType;
                                private final double[] noiseArray;
                                private float[] parabolicField;
                                   private final double[] field_147434_q;
                                   private MapGenBase caveGenerator;
                                   private MapGenMineshaft mineshaftGenerator;
                                   private MapGenBase ravineGenerator;
                                private boolean mapFeaturesEnabled;
                                private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature();    
                                private double[] stoneNoise = new double[256];
                                private BiomeGenBase[] biomesForGeneration;
                                double[] noiseData1;
                                double[] noiseData2;
                                double[] noiseData3;
                                double[] noiseData4;
                                private final List structureGenerators = Lists.newArrayList();
                                private final IBlockState[] cachedBlockIDs = new IBlockState[256];
                                {
                                caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE);
                                mineshaftGenerator = (MapGenMineshaft)TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT);
                                scatteredFeatureGenerator = (MapGenScatteredFeature)TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);
                                ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE);
                                }
                                
                                public ChunkProviderFrightful(World world, long seed, boolean features, String p_i45636_5_)
                                {
                                this.worldObj = world;
                                this.mapFeaturesEnabled = features;
                                this.worldType = world.getWorldInfo().getTerrainType();
                                this.rand = new Random(seed);
                                this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16);
                                this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
                                this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
                                this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4);
                                this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
                                this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
                                this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
                                this.noiseArray = new double[825];
                                this.parabolicField = new float[25];
                                
                                for (int j = -2; j <= 2; ++j)
                                {
                                for (int k = -2; k <= 2; ++k)
                                {
                                float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
                                this.parabolicField[j + 2 + (k + 2) * 5] = f;
                                }
                                }
                                
                                NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise};
                                noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
                                this.noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
                                this.noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
                                this.noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
                                this.noiseGen4 = (NoiseGeneratorPerlin)noiseGens[3];
                                this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
                                this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
                                this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
                                
                                this.field_177476_s = Blocks.water;
                                       this.stoneNoise = new double[256];
                                       this.caveGenerator = new MapGenCaves();
                                       this.mineshaftGenerator = new MapGenMineshaft();
                                       this.scatteredFeatureGenerator = new MapGenScatteredFeature();
                                       this.ravineGenerator = new MapGenRavine();
                                       {
                                           caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE);
                                           mineshaftGenerator = (MapGenMineshaft)TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT);
                                           scatteredFeatureGenerator = (MapGenScatteredFeature)TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);
                                           ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE);
                                       }
                                       this.worldObj = world;
                                       this.mapFeaturesEnabled = features;
                                       this.worldType = world.getWorldInfo().getTerrainType();
                                       this.rand = new Random(seed);
                                       this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16);
                                       this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
                                       this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
                                       this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4);
                                       this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
                                       this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
                                       this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
                                       this.field_147434_q = new double[825];
                                       this.parabolicField = new float[25];
                                
                                       for (int j = -2; j <= 2; ++j)
                                       {
                                           for (int k = -2; k <= 2; ++k)
                                           {
                                               float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
                                               this.parabolicField[j + 2 + (k + 2) * 5] = f;
                                           }
                                       }
                                
                                       if (p_i45636_5_ != null)
                                       {
                                           this.settings = ChunkProviderSettings.Factory.func_177865_a(p_i45636_5_).func_177864_b();
                                           this.field_177476_s = this.settings.useLavaOceans ? Blocks.lava : Blocks.water;
                                       }
                                }
                                
                                public Chunk provideChunk(int x, int z)
                                {
                                this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
                                ChunkPrimer chunkprimer = new ChunkPrimer();
                                this.setBlocksInChunk(x, z, chunkprimer);
                                this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
                                this.func_180517_a(x, z, chunkprimer, this.biomesForGeneration);
                                
                                Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
                                byte[] abyte = chunk.getBiomeArray();
                                
                                for (int k = 0; k < abyte.length; ++k)
                                {
                                abyte[k] = (byte)this.biomesForGeneration[k].biomeID;
                                }
                                
                                chunk.generateSkylightMap();
                                return chunk;
                                }
                                
                                public void setBlocksInChunk(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_)
                                   {
                                       this.biomesForGeneration = this.worldObj.getWorldChunkManager().getBiomesForGeneration(this.biomesForGeneration, p_180518_1_ * 4 - 2, p_180518_2_ * 4 - 2, 10, 10);
                                       this.func_147423_a(p_180518_1_ * 4, 0, p_180518_2_ * 4);
                                
                                       for (int k = 0; k < 4; ++k)
                                       {
                                           int l = k * 5;
                                           int i1 = (k + 1) * 5;
                                
                                           for (int j1 = 0; j1 < 4; ++j1)
                                           {
                                               int k1 = (l + j1) * 33;
                                               int l1 = (l + j1 + 1) * 33;
                                               int i2 = (i1 + j1) * 33;
                                               int j2 = (i1 + j1 + 1) * 33;
                                
                                               for (int k2 = 0; k2 < 32; ++k2)
                                               {
                                                   double d0 = 0.125D;
                                                   double d1 = this.noiseArray[k1 + k2];
                                                   double d2 = this.noiseArray[l1 + k2];
                                                   double d3 = this.noiseArray[i2 + k2];
                                                   double d4 = this.noiseArray[j2 + k2];
                                                   double d5 = (this.noiseArray[k1 + k2 + 1] - d1) * d0;
                                                   double d6 = (this.noiseArray[l1 + k2 + 1] - d2) * d0;
                                                   double d7 = (this.noiseArray[i2 + k2 + 1] - d3) * d0;
                                                   double d8 = (this.noiseArray[j2 + k2 + 1] - d4) * d0;
                                
                                                   for (int l2 = 0; l2 < 8; ++l2)
                                                   {
                                                       double d9 = 0.25D;
                                                       double d10 = d1;
                                                       double d11 = d2;
                                                       double d12 = (d3 - d1) * d9;
                                                       double d13 = (d4 - d2) * d9;
                                
                                                       for (int i3 = 0; i3 < 4; ++i3)
                                                       {
                                                           double d14 = 0.25D;
                                                           double d16 = (d11 - d10) * d14;
                                                           double d15 = d10 - d16;
                                
                                                           for (int j3 = 0; j3 < 4; ++j3)
                                                           {
                                                               if ((d15 += d16) > 0.0D)
                                                               {
                                                                   p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, Blocks.stone.getDefaultState());
                                                               }
                                                               else if (k2 * 8 + l2 < 64)
                                                               {
                                                                   p_180518_3_.setBlockState(k * 4 + i3, k2 * 8 + l2, j1 * 4 + j3, this.field_177476_s.getDefaultState());
                                                               }
                                                           }
                                
                                                           d10 += d12;
                                                           d11 += d13;
                                                       }
                                
                                                       d1 += d5;
                                                       d2 += d6;
                                                       d3 += d7;
                                                       d4 += d8;
                                                   }
                                               }
                                           }
                                       }
                                   }
                                
                                   public void func_180517_a(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_)
                                   {
                                       ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj);
                                       MinecraftForge.EVENT_BUS.post(event);
                                       if (event.getResult() == Result.DENY) return;
                                
                                       double d0 = 0.03125D;
                                       this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, (double)(p_180517_1_ * 16), (double)(p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
                                
                                       for (int k = 0; k < 16; ++k)
                                       {
                                           for (int l = 0; l < 16; ++l)
                                           {
                                               BiomeGenBase biomegenbase = p_180517_4_[l + k * 16];
                                               biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_180517_3_, p_180517_1_ * 16 + k, p_180517_2_ * 16 + l, this.stoneNoise[l + k * 16]);
                                           }
                                       }
                                   }
                                
                                public boolean func_177460_a(IChunkProvider p_177460_1_, Chunk p_177460_2_, int p_177460_3_, int p_177460_4_)
                                {
                                return false;
                                }
                                
                                private void func_147423_a(int x, int y, int z)
                                {
                                double d0 = 684.412D;
                                double d1 = 684.412D;
                                double d2 = 512.0D;
                                double d3 = 512.0D;
                                this.noiseData4 = this.noiseGen6.generateNoiseOctaves(this.noiseData4, x, z, 5, 5, 200.0D, 200.0D, 0.5D);
                                this.noiseData1 = this.noiseGen3.generateNoiseOctaves(this.noiseData1, x, y, z, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D);
                                this.noiseData2 = this.noiseGen1.generateNoiseOctaves(this.noiseData2, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D);
                                this.noiseData3 = this.noiseGen2.generateNoiseOctaves(this.noiseData3, x, y, z, 5, 33, 5, 684.412D, 684.412D, 684.412D);
                                boolean flag1 = false;
                                boolean flag = false;
                                int l = 0;
                                int i1 = 0;
                                double d4 = 8.5D;
                                
                                for (int j1 = 0; j1 < 5; ++j1)
                                {
                                for (int k1 = 0; k1 < 5; ++k1)
                                {
                                float f = 0.0F;
                                float f1 = 0.0F;
                                float f2 = 0.0F;
                                byte b0 = 2;
                                BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10];
                                
                                for (int l1 = -b0; l1 <= b0; ++l1)
                                {
                                for (int i2 = -b0; i2 <= b0; ++i2)
                                {
                                BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10];
                                float f3 = biomegenbase1.minHeight;
                                float f4 = biomegenbase1.maxHeight;
                                
                                float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F);
                                
                                if (biomegenbase1.minHeight > biomegenbase.minHeight)
                                {
                                f5 /= 2.0F;
                                }
                                
                                f += f4 * f5;
                                f1 += f3 * f5;
                                f2 += f5;
                                }
                                }
                                
                                f /= f2;
                                f1 /= f2;
                                f = f * 0.9F + 0.1F;
                                f1 = (f1 * 4.0F - 1.0F) / 8.0F;
                                double d13 = this.noiseData4[i1] / 8000.0D;
                                
                                if (d13 < 0.0D)
                                {
                                d13 = -d13 * 0.3D;
                                }
                                
                                d13 = d13 * 3.0D - 2.0D;
                                
                                if (d13 < 0.0D)
                                {
                                d13 /= 2.0D;
                                
                                if (d13 < -1.0D)
                                {
                                d13 = -1.0D;
                                }
                                
                                d13 /= 1.4D;
                                d13 /= 2.0D;
                                }
                                else
                                {
                                if (d13 > 1.0D)
                                {
                                d13 = 1.0D;
                                }
                                
                                d13 /= 8.0D;
                                }
                                
                                ++i1;
                                double d12 = (double)f1;
                                double d14 = (double)f;
                                d12 += d13 * 0.2D;
                                d12 = d12 * 8.5D / 8.0D;
                                double d5 = 8.5D + d13 * 4.0D;
                                
                                for (int j2 = 0; j2 < 33; ++j2)
                                {
                                double d6 = ((double)j2 - d5) * 12.0D * 128.0D / 256.0D / d14;
                                
                                if (d6 < 0.0D)
                                {
                                d6 *= 4.0D;
                                }
                                
                                double d7 = this.noiseData2[l] / 512.0D;
                                double d8 = this.noiseData3[l] / 512.0D;
                                double d9 = (this.noiseData1[l] / 10.0D + 1.0D) / 2.0D;
                                double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6;
                                
                                if (j2 > 29)
                                {
                                double d11 = (double)((float)(j2 - 29) / 3.0F);
                                d10 = d10 * (1.0D - d11) + -10.0D * d11;
                                }
                                
                                this.noiseArray[l] = d10;
                                ++l;
                                }
                                }
                                }
                                }
                                
                                public boolean chunkExists(int par1, int par2)
                                {
                                return true;
                                }
                                
                                public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
                                {
                                BlockFalling.fallInstantly = true;
                                int k = p_73153_2_ * 16;
                                int l = p_73153_3_ * 16;
                                BlockPos blockpos = new BlockPos(k, 0, l);
                                BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos.add(16, 0, 16));
                                this.rand.setSeed(this.worldObj.getSeed());
                                long i1 = this.rand.nextLong() / 2L * 2L + 1L;
                                long j1 = this.rand.nextLong() / 2L * 2L + 1L;
                                this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
                                boolean flag = false;
                                ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);
                                
                                MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
                                
                                if (this.mapFeaturesEnabled)
                                {
                                this.scatteredFeatureGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
                                }
                                
                                int k1;
                                
                                int l1;
                                
                                int i2;
                                
                                boolean doGen = TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, DUNGEON);
                                for(k1 = 0; doGen && k1 < this.settings.dungeonChance; ++k1)
                                {
                                l1 = this.rand.nextInt(16) + 8;
                                
                                i2 = this.rand.nextInt(256);
                                
                                int j2 = this.rand.nextInt(16) + 8;
                                
                                (new WorldGenDungeons()).generate(this.worldObj, this.rand, blockpos.add(l1, i2, j2));
                                
                                }
                                
                                biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
                                
                                if(TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, ANIMALS))
                                {
                                SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
                                }
                                
                                blockpos = blockpos.add(8, 0, 8);
                                
                                boolean doGen1 = TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, ICE);
                                
                                for(k1 = 0; doGen1 && k1 < 16; ++k1)
                                {
                                for(l1 = 0; l1 < 16; ++l1)
                                {
                                BlockPos blockpos1 = this.worldObj.getPrecipitationHeight(blockpos.add(k1, 0, l1));
                                BlockPos blockpos2 = blockpos1.down();
                                
                                if(this.worldObj.func_175675_v(blockpos2))
                                {
                                this.worldObj.setBlockState(blockpos2, Blocks.ice.getDefaultState(), 2);
                                }
                                
                                if(this.worldObj.canSnowAt(blockpos1, true))
                                {
                                this.worldObj.setBlockState(blockpos1, Blocks.snow_layer.getDefaultState(), 2);
                                }
                                }
                                }
                                
                                MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
                                
                                BlockFalling.fallInstantly = false;
                                }
                                
                                public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
                                {
                                return true;
                                }
                                
                                public void saveExtraData() {}
                                
                                public boolean unloadQueuedChunks()
                                {
                                return false;
                                }
                                
                                public boolean canSave()
                                {
                                return true;
                                }
                                
                                public String makeString()
                                {
                                return "FrightfulLevelSource";
                                }
                                
                                public List func_177458_a(EnumCreatureType p_177458_1_, BlockPos p_177458_2_)
                                {
                                BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(p_177458_2_);
                                return biomegenbase.getSpawnableList(p_177458_1_);
                                }
                                
                                public int getLoadedChunkCount()
                                {
                                return 0;
                                }
                                
                                @Override
                                public Chunk provideChunk(BlockPos blockPosIn)
                                {
                                return this.provideChunk(blockPosIn.getX() >> 4, blockPosIn.getZ() >> 4);
                                }
                                
                                @Override
                                public BlockPos getStrongholdGen(World worldIn, String p_180513_2_, BlockPos p_180513_3_)
                                {
                                return null;
                                }
                                
                                @Override
                                public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
                                {
                                Iterator iterator = this.structureGenerators.iterator();
                                
                                while (iterator.hasNext())
                                {
                                MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
                                mapgenstructure.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
                                }
                                }
                                
                                public void replaceBlocksForBiome(int coordX, int coordZ, ChunkPrimer chunkprimer, byte[] arrayOfByte, BiomeGenBase[] biomeList)
                                {
                                World world = null;
                                ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, coordX, coordZ, chunkprimer, world);
                                MinecraftForge.EVENT_BUS.post(event);
                                if (event.getResult() == Result.DENY) return;
                                
                                double d0 = 0.03125D;
                                this.stoneNoise = this.noiseGen4.func_151599_a(this.stoneNoise, (double)(coordX * 16), (double)(coordZ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
                                
                                for (int k = 0; k < 16; ++k)
                                {
                                for (int l = 0; l < 16; ++l)
                                {
                                BiomeGenPlains /*TODO ce biome est a remplacer par le votre*/ biomegenbase = (BiomeGenPlains)biomeList[l + k * 16];
                                biomegenbase.genTerrainBlocks(this.worldObj, this.rand, chunkprimer, coordX * 16 + k, coordZ * 16 + l, this.stoneNoise[l + k * 16]);
                                }
                                }
                                }
                                }
                                

                                GenLayerFrightful :

                                package This_is_Halloween.Frightful;
                                
                                import net.minecraft.world.gen.layer.GenLayer;
                                import net.minecraft.world.gen.layer.GenLayerVoronoiZoom;
                                import net.minecraft.world.gen.layer.GenLayerZoom;
                                
                                public abstract class GenLayerFrightful extends GenLayer{
                                
                                public GenLayerFrightful(long seed)
                                {
                                super(seed);
                                }
                                
                                public static GenLayer[] makeTheWorld(long seed)
                                {
                                GenLayer biomes = new BiomeGenLayerFrightful(1L);
                                biomes = new GenLayerZoom(1000L, biomes);
                                biomes = new GenLayerZoom(1001L, biomes);
                                biomes = new GenLayerZoom(1002L, biomes);
                                biomes = new GenLayerZoom(1003L, biomes);
                                biomes = new GenLayerZoom(1004L, biomes);
                                biomes = new GenLayerZoom(1005L, biomes);
                                GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes);
                                biomes.initWorldGenSeed(seed);
                                genlayervoronoizoom.initWorldGenSeed(seed);
                                return new GenLayer[] {biomes, genlayervoronoizoom};
                                }
                                
                                }
                                
                                

                                WorldChunkManagerFrightful :

                                package This_is_Halloween.Frightful;
                                
                                import static net.minecraft.world.biome.BiomeGenBase.forest;
                                import static net.minecraft.world.biome.BiomeGenBase.forestHills;
                                import static net.minecraft.world.biome.BiomeGenBase.jungle;
                                import static net.minecraft.world.biome.BiomeGenBase.jungleHills;
                                import static net.minecraft.world.biome.BiomeGenBase.plains;
                                import static net.minecraft.world.biome.BiomeGenBase.taiga;
                                import static net.minecraft.world.biome.BiomeGenBase.taigaHills;
                                import java.util.ArrayList;
                                import java.util.Arrays;
                                import java.util.List;
                                import java.util.Random;
                                import com.google.common.collect.Lists;
                                import net.minecraft.crash.CrashReport;
                                import net.minecraft.crash.CrashReportCategory;
                                import net.minecraft.util.BlockPos;
                                import net.minecraft.util.ReportedException;
                                import net.minecraft.world.World;
                                import net.minecraft.world.WorldType;
                                import net.minecraft.world.biome.BiomeCache;
                                import net.minecraft.world.biome.BiomeGenBase;
                                import net.minecraft.world.biome.WorldChunkManager;
                                import net.minecraft.world.gen.layer.GenLayer;
                                import net.minecraft.world.gen.layer.IntCache;
                                import net.minecraftforge.common.MinecraftForge;
                                import net.minecraftforge.event.terraingen.WorldTypeEvent;
                                import net.minecraftforge.fml.relauncher.Side;
                                import net.minecraftforge.fml.relauncher.SideOnly;
                                
                                public class WorldChunkManagerFrightful extends WorldChunkManager {
                                
                                private BiomeGenBase biomegenbase;
                                private GenLayer GenBiomes;
                                private GenLayer BiomeIndexLayer;
                                private BiomeCache BiomeCache;
                                private List <biomegenbase>BiomesToSpawnIn;
                                private List <biomegenbase>biomes;
                                   private static String field_180301_f;
                                
                                public WorldChunkManagerFrightful()
                                {
                                this.BiomeCache = new BiomeCache(this);
                                this.BiomesToSpawnIn = new ArrayList<biomegenbase>();
                                this.BiomesToSpawnIn.add(BiomeGenBase.plains);
                                }
                                
                                public WorldChunkManagerFrightful(long seed, WorldType worldtype, String string)
                                {
                                this();
                                GenLayer[] agenlayer = GenLayerFrightful.makeTheWorld(seed);
                                this.GenBiomes = agenlayer[0];
                                this.BiomeIndexLayer = agenlayer[1];
                                }
                                
                                public WorldChunkManagerFrightful(World world)
                                {
                                this(world.getSeed(), world.getWorldInfo().getTerrainType(), field_180301_f);
                                }
                                
                                public List <biomegenbase>getBiomesToSpawnIn()
                                {
                                return this.BiomesToSpawnIn;
                                }
                                
                                public BiomeGenBase getBiomeGenAt(int x, int z)
                                {
                                BiomeGenBase biome = this.BiomeCache.func_180284_a(x, z, biomegenbase);
                                if(biome == null)
                                {
                                return BiomeGenBase.plains;
                                }
                                return biome;
                                }
                                
                                public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length)
                                {
                                if(listToReuse == null || listToReuse.length < width * length)
                                {
                                listToReuse = new float[width * length];
                                }
                                Arrays.fill(listToReuse, 0, width * length, 0.0F);
                                return listToReuse;
                                }
                                
                                @SideOnly(Side.CLIENT)
                                public float getTemperatureAtHeight(float par1, int par2)
                                {
                                return par1;
                                
                                }
                                
                                public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5)
                                {      
                                IntCache.resetIntCache();
                                
                                if(par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
                                {
                                par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
                                }
                                int[] aint = this.GenBiomes.getInts(par2, par3, par4, par5);
                                
                                for(int i = 0; i < par4 * par5; ++i)
                                {
                                if(aint* >= 0)
                                {
                                par1ArrayOfBiomeGenBase* = BiomeGenBase.getBiome(aint*);
                                }
                                else
                                
                                {
                                par1ArrayOfBiomeGenBase* = BiomeGenBase.plains;
                                }
                                
                                }
                                return par1ArrayOfBiomeGenBase;
                                }
                                
                                public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth)
                                {
                                return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
                                }
                                
                                public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int z, int width, int length, boolean cacheFlag)
                                {
                                IntCache.resetIntCache();
                                
                                if (listToReuse == null || listToReuse.length < width * length)
                                {
                                listToReuse = new BiomeGenBase[width * length];
                                }
                                
                                if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (z & 15) == 0)
                                {
                                BiomeGenBase[] abiomegenbase1 = this.BiomeCache.getCachedBiomes(x, z);
                                System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
                                return listToReuse;
                                }
                                else
                                {
                                int[] aint = this.BiomeIndexLayer.getInts(x, z, width, length);
                                
                                for(int i1 = 0; i1 < width * length; ++i1)
                                {
                                if(aint[i1] >= 0)
                                {
                                listToReuse[i1] = BiomeGenBase.getBiome(aint[i1]);
                                }
                                else
                                {
                                listToReuse[i1] = BiomeGenBase.plains;
                                }
                                }
                                return listToReuse;
                                }
                                }
                                
                                public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
                                {
                                IntCache.resetIntCache();
                                int l = par1 - par3 >> 2;
                                int i1 = par2 - par3 >> 2;
                                int j1 = par1 + par3 >> 2;
                                int k1 = par2 + par3 >> 2;
                                int l1 = j1 - l + 1;
                                int i2 = k1 - i1 + 1;
                                int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                                
                                for(int j2 = 0; j2 < l1 * i2; ++j2)
                                {
                                BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);
                                
                                if(!par4List.contains(biomegenbase))
                                {
                                return false;
                                }
                                }
                                return true;
                                }
                                
                                public BlockPos findBiomePosition(int x, int z, int range, List list, Random random)
                                {
                                IntCache.resetIntCache();
                                int l = x - range >> 2;
                                int i1 = z - range >> 2;
                                int j1 = x + range >> 2;
                                int k1 = z + range >> 2;
                                int l1 = j1 - l + 1;
                                int i2 = k1 - i1 + 1;
                                int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                                BlockPos blockpos = null;
                                int j2 = 0;
                                for(int k2 = 0; k2 < l1 * i2; ++k2)
                                {
                                int l2 = l + k2 % l1 << 2;
                                int i3 = i1 + k2 / l1 << 2;
                                BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);
                                
                                if(biomes.contains(biomegenbase) && (blockpos == null || random.nextInt(j2 + 1) == 0))
                                {
                                blockpos = new BlockPos(l2, 0, i3);
                                ++j2;
                                }
                                }
                                return blockpos;
                                }
                                public void cleanupCache()
                                {
                                this.BiomeCache.cleanupCache();
                                }
                                }
                                

                                WorldProviderFrightful :

                                package This_is_Halloween.Frightful;
                                
                                import This_is_Halloween.This_is_Halloween;
                                import net.minecraft.entity.Entity;
                                import net.minecraft.init.Blocks;
                                import net.minecraft.util.MathHelper;
                                import net.minecraft.util.Vec3;
                                import net.minecraft.world.World;
                                import net.minecraft.world.WorldProvider;
                                import net.minecraft.world.WorldProviderHell;
                                import net.minecraft.world.WorldProviderSurface;
                                import net.minecraft.world.biome.BiomeGenBase;
                                import net.minecraft.world.chunk.IChunkProvider;
                                import net.minecraftforge.fml.relauncher.SideOnly;
                                import net.minecraftforge.fml.relauncher.Side;
                                
                                public class WorldProviderFrightful extends WorldProvider{
                                
                                   private String generatorSettings;
                                
                                public void registerWorldChunkManager()
                                {
                                this.worldChunkMgr = new WorldChunkManagerFrightful();
                                this.hasNoSky = false;
                                this.dimensionId = This_is_Halloween.dimensionID;
                                }
                                
                                public IChunkProvider createChunkGenerator()
                                {
                                return new ChunkProviderFrightful(this.worldObj, this.worldObj.getSeed(), false, generatorSettings);
                                }
                                
                                public String getDimensionName()
                                {
                                return This_is_Halloween.dimensionName;
                                }
                                
                                public String getSaveFolder()
                                {
                                return this.getDimensionName();
                                }
                                
                                public boolean isSurfaceWorld()
                                {
                                return false;
                                }
                                
                                public boolean canRespawnHere()
                                {
                                return false;
                                }
                                
                                public boolean getWorldHasVoidParticles()
                                {
                                return true;
                                }
                                
                                public int getHeight()
                                {
                                return 256;
                                }
                                
                                protected void generateLightBrightnessTable()
                                {
                                float f = 0.2F;
                                
                                for(int i = 0; i <= 15; ++i)
                                {
                                float f1 = 1.0F - (float)i / 15.0F;
                                this.lightBrightnessTable* = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
                                }
                                }
                                
                                // Moon's and Sun's Angle
                                public float calculateCelestialAngle(long par1, float par2)
                                {
                                int j = (int)(par1 % 24000L);
                                float f1 = ((float)j + par2) / 24000.0F - 0.25F;
                                
                                if(f1 < 0.0F)
                                {
                                ++f1;
                                }
                                if(f1 > 1.0F)
                                {
                                –f1;
                                }
                                float f2 = f1;
                                f1 = 1.0F - (float)((Math.cos((double)f1 * Math.PI) + 1.0D) / 2.0D);
                                f1 = f2 + (f1 - f2) / 3.0F;
                                return f1;
                                }
                                
                                public int getMoonPhase(long par1)
                                {
                                return (int)(par1 / 24000L % 8L + 8L) % 8;
                                }
                                
                                @SideOnly(Side.CLIENT)
                                public boolean isSkyColored()
                                {
                                return false;
                                }
                                
                                /**@Override
                                public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
                                {  
                                return Vec3.createVectorHelper(10, 0, 20);
                                }**/
                                
                                @Override
                                public String getInternalNameSuffix()
                                {
                                return this.getSaveFolder();
                                }
                                
                                }
                                
                                

                                EDIT : je viens de comprendre à quoi sert la classe BiomeList : je crois qu’elle sert à créer des nouveaux biomes, pour ne pas les mettre dans la classe principale. Est-ce bien ça ?</biomegenbase></biomegenbase></biomegenbase></biomegenbase>

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

                                  pour répondre à ton edit, oui ^^
                                  Ensuite, je suis pas content ! Je pense que tu te fou de ma gueule ! Je te fait des classes pas pour décorer ! je te les fait pour que tu les utilises. Ensuite CHANGE les références au variable des biomes par ton biome, dans ton chunkprovider change dans la fonction replaceBlocksForBiome BiomeGenBase par la classe de ton biome, et de même pour cette fonction func_177458_a.

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

                                    Désolé pour le temps de la réponse.
                                    Je ne me fous pas de toi, j’ai mis ce que tu m’a donné, j’en suis sûr. Mais je n’ai pas copier, j’ai fait ligne par ligne (j’ai comparer avec ce que j’avais, j’ajoutais ce que j’avais pas et j’enlevais ce que j’avais). J’ai dû oublier des lignes. Là, j’ai remplacer mes classes par les tiennes (en corrigeant les erreurs et en faisant ce que tu m’a dis.
                                    Même crash, référencés aux mêmes lignes, comme si j’ai rien changer

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

                                      Dans le code que je t’ai passer c’étais quoi comme érreur ?

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

                                        Pour le ChunkProvider, je ne me souviens pas d’erreur
                                        Pour le WorldChunkManager : dans cette fonction : ```java
                                        public BiomeGenBase getBiomeGenAt(int x, int z)
                                        {
                                        BiomeGenBase biome = this.BiomeCache.func_180284_a(x, z, biomegenbase);

                                        if(biome == null)
                                        {
                                        return This_is_Halloween.This_is_Halloween.Evilland;
                                        }
                                        return biome;
                                        }
                                        , le biomegenbase n'était pas déclaré. Dans cette fonction : java
                                        public WorldChunkManagerFrightful(World world)
                                        {
                                        this(world.getSeed(), world.getWorldInfo().getTerrainType());
                                        }
                                        , eclipse m'a proposer d'ajouter un String juste avant la dernière parenthèse, de supprimer pour laisser juste le this() ou de changer le constructeur. J'ai opter pour la 1ère option. Et dans cette fonction : java
                                        public BlockPos findBiomePosition(int x, int z, int range, List list, Random random)
                                        {
                                        IntCache.resetIntCache();
                                        int l = x - range >> 2;
                                        int i1 = z - range >> 2;
                                        int j1 = x + range >> 2;
                                        int k1 = z + range >> 2;
                                        int l1 = j1 - l + 1;
                                        int i2 = k1 - i1 + 1;
                                        int[] aint = this.GenBiomes.getInts(l, i1, l1, i2);
                                        BlockPos blockpos = null;
                                        int j2 = 0;

                                        for(int k2 = 0; k2 < l1 * i2; ++k2)
                                        {
                                        int l2 = l + k2 % l1 << 2;
                                        int i3 = i1 + k2 / l1 << 2;
                                        BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);

                                        if(biomes.contains(biomegenbase) && (blockpos == null || random.nextInt(j2 + 1) == 0))
                                        {
                                        blockpos = new BlockPos(l2, 0, i3);
                                        ++j2;
                                        }
                                        }
                                        return blockpos;
                                        }

                                        
                                        J'ai ajouté : ```java
                                        private BiomeGenBase biomegenbase;
                                        private List <biomegenbase>biomes;
                                        

                                        Pour la 1ère et 3ème erreur, ce n’en est pas vraiment. En revanche, la 2ème, c’en était une et je ne sais pas si j’ai fait ce qu’il fallait.</biomegenbase>

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

                                          dés que je rentre chez moi je vais chercher en profondeur.

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

                                            Ok merci 😉

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB