use of ivorius.reccomplex.world.gen.feature.structure.generic.generation.StaticGeneration in project RecurrentComplex by Ivorforce.
the class WorldGenStructures method planStaticStructuresInChunk.
public static void planStaticStructuresInChunk(Random random, ChunkPos chunkPos, WorldServer world, BlockPos spawnPos, @Nullable Predicate<Structure> structurePredicate) {
StructureRegistry.INSTANCE.getStaticStructuresAt(chunkPos, world, spawnPos).forEach(triple -> {
StaticGeneration staticGenInfo = triple.getMiddle();
Structure<?> structure = triple.getLeft();
BlockSurfacePos pos = triple.getRight();
if (structurePredicate != null && !structurePredicate.test(structure))
return;
new StructureGenerator<>(structure).world(world).generationInfo(staticGenInfo).seed(random.nextLong()).randomPosition(pos, staticGenInfo.placer.getContents()).fromCenter(true).partially(RecurrentComplex.PARTIALLY_SPAWN_NATURAL_STRUCTURES, chunkPos).generate();
});
}
Aggregations