use of ivorius.reccomplex.world.gen.feature.StructureGenerator in project RecurrentComplex by Ivorforce.
the class GenericVillagePiece method prepare.
public void prepare(WorldServer world) {
Structure<?> structure = StructureRegistry.INSTANCE.get(structureID);
if (structure == null)
return;
GenerationType generationType = structure.generationType(generationID);
if (!(generationType instanceof VanillaGeneration))
return;
VanillaGeneration vanillaGenInfo = (VanillaGeneration) generationType;
AxisAlignedTransform2D transform = getTransform(vanillaGenInfo.front, mirrorX, getCoordBaseMode().getOpposite());
instanceData = new StructureGenerator<>(structure).seed(seed).environment(environment(world, generationType)).transform(transform).boundingBox(boundingBox).instanceData().map(NBTStorable::writeToNBT).orElse(null);
}
Aggregations