use of ivorius.reccomplex.nbt.NBTNone in project RecurrentComplex by Ivorforce.
the class WorldScriptHolder method generate.
@Override
public void generate(StructureSpawnContext context, RunTransformer transformer, NBTNone instanceData, BlockPos pos) {
if (worldData == null) {
return;
}
GenericStructure structure = new GenericStructure();
structure.worldDataCompound = worldData.copy();
int[] strucSize = structure.size();
BlockPos strucCoord = context.transform.apply(origin, new int[] { 1, 1, 1 }).subtract(context.transform.apply(BlockPos.ORIGIN, strucSize)).add(pos);
new StructureGenerator<>(structure).asChild(context).transformer(transformer).lowerCoord(strucCoord).generationPredicate(p -> !p.equals(pos)).generate();
context.setBlock(pos, replaceState, 2);
}
Aggregations