Search in sources :

Example 1 with IChunkGenerator

use of net.minecraft.world.chunk.IChunkGenerator in project RecurrentComplex by Ivorforce.

the class GenerationSanityChecker method init.

public static void init() {
    FAILED_DIMENSIONS.clear();
    // Sanity check for chunk population
    GameRegistry.registerWorldGenerator((Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) -> {
        ChunkPos pos = new ChunkPos(chunkX, chunkZ);
        if (!WorldStructureGenerationData.get(world).checkChunk(pos))
            return;
        if (FAILED_DIMENSIONS.add(world.provider.getDimension()))
            RecurrentComplex.logger.error(String.format("Chunk finished generating without Forge population being triggered (dimension %d). This is a bug with the dimension - please report this to the dimension's author. Recurrent Complex will proceed to generate in compatibility mode.", world.provider.getDimension()));
        WorldGenStructures.decorate((WorldServer) world, random, pos, null);
    }, 1);
}
Also used : IChunkGenerator(net.minecraft.world.chunk.IChunkGenerator) Random(java.util.Random) IChunkProvider(net.minecraft.world.chunk.IChunkProvider) ChunkPos(net.minecraft.util.math.ChunkPos) World(net.minecraft.world.World)

Aggregations

Random (java.util.Random)1 ChunkPos (net.minecraft.util.math.ChunkPos)1 World (net.minecraft.world.World)1 IChunkGenerator (net.minecraft.world.chunk.IChunkGenerator)1 IChunkProvider (net.minecraft.world.chunk.IChunkProvider)1