use of net.minecraft.world.gen.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()));
// @ Mod authors
// Please fire PopulateChunkEvent.Pre before, and PopulateChunkEvent.Post after chunk decoration.
// Use ForgeEventFactory.onChunkPopulate(true, this, world, random, x, z, hasVillage); for pre
// Use ForgeEventFactory.onChunkPopulate(false, this, world, random, x, z, hasVillage); for post
// Via ChunkGeneratorOverworld
// This IChunkGenerator setup will work, but it's not preferred.
WorldGenStructures.decorate((WorldServer) world, random, pos, null);
}, 1);
}
Aggregations