use of ivorius.reccomplex.operation.OperationGenerateSchematic in project RecurrentComplex by Ivorforce.
the class CommandImportSchematic method execute.
@Override
public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) throws CommandException {
Function<Parameters, Parameters> c = expect()::declare;
Parameters parameters = Parameters.of(args, c);
if (args.length < 1)
throw RecurrentComplex.translations.wrongUsageException("commands.rcimportschematic.usage");
SchematicFile schematicFile = parseSchematic(parameters.get(0).require());
BlockPos pos = parameters.get(MCP.pos("x", "y", "z", commandSender.getPosition(), false)).require();
AxisAlignedTransform2D transform = parameters.get(IvP.transform("rotation", "mirror")).optional().orElse(AxisAlignedTransform2D.ORIGINAL);
OperationRegistry.queueOperation(new OperationGenerateSchematic(schematicFile, transform, pos), commandSender);
}
Aggregations