Search in sources :

Example 1 with OperationGenerateSchematic

use of ivorius.reccomplex.world.gen.feature.structure.schematics.OperationGenerateSchematic in project RecurrentComplex by Ivorforce.

the class CommandImportSchematic method execute.

@Override
public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) throws CommandException {
    RCParameters parameters = RCParameters.of(args, "mirror");
    if (args.length < 1)
        throw ServerTranslations.wrongUsageException("commands.rcimportschematic.usage");
    SchematicFile schematicFile = parseSchematic(parameters.get().first().require());
    BlockPos pos = parameters.pos("x", "y", "z", commandSender.getPosition(), false).require();
    AxisAlignedTransform2D transform = parameters.transform("rotation", "mirror").optional().orElse(AxisAlignedTransform2D.ORIGINAL);
    OperationRegistry.queueOperation(new OperationGenerateSchematic(schematicFile, transform, pos), commandSender);
}
Also used : RCParameters(ivorius.reccomplex.commands.parameters.RCParameters) SchematicFile(ivorius.reccomplex.world.gen.feature.structure.schematics.SchematicFile) AxisAlignedTransform2D(ivorius.ivtoolkit.math.AxisAlignedTransform2D) OperationGenerateSchematic(ivorius.reccomplex.world.gen.feature.structure.schematics.OperationGenerateSchematic) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

AxisAlignedTransform2D (ivorius.ivtoolkit.math.AxisAlignedTransform2D)1 RCParameters (ivorius.reccomplex.commands.parameters.RCParameters)1 OperationGenerateSchematic (ivorius.reccomplex.world.gen.feature.structure.schematics.OperationGenerateSchematic)1 SchematicFile (ivorius.reccomplex.world.gen.feature.structure.schematics.SchematicFile)1 BlockPos (net.minecraft.util.math.BlockPos)1