use of ivorius.reccomplex.world.gen.feature.structure.OperationGenerateStructure in project RecurrentComplex by Ivorforce.
the class CommandSelectDuplicate method execute.
@Override
public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) throws CommandException {
RCParameters parameters = RCParameters.of(args, "mirror");
SelectionOwner selectionOwner = RCCommands.getSelectionOwner(commandSender, null, true);
BlockArea area = selectionOwner.getSelection();
BlockPos pos = parameters.pos("x", "y", "z", commandSender.getPosition(), false).require();
AxisAlignedTransform2D transform = parameters.transform("rotation", "mirror").optional().orElse(AxisAlignedTransform2D.ORIGINAL);
IvWorldData worldData = IvWorldData.capture(commandSender.getEntityWorld(), area, true);
NBTTagCompound worldDataCompound = worldData.createTagCompound();
GenericStructure structureInfo = GenericStructure.createDefaultStructure();
structureInfo.worldDataCompound = worldDataCompound;
OperationRegistry.queueOperation(new OperationGenerateStructure(structureInfo, null, transform, pos, true).prepare((WorldServer) commandSender.getEntityWorld()), commandSender);
}
Aggregations