use of com.fastasyncworldedit.core.extent.transform.ScaleTransform in project FastAsyncWorldEdit by IntellectualSites.
the class ScaleTransformParser method parseFromInput.
@Override
protected ResettableExtent parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException {
double xScale;
double yScale;
double zScale;
Extent extent;
if (arguments.length == 1) {
xScale = yScale = zScale = Double.parseDouble(arguments[0]);
extent = context.requireExtent();
} else if (arguments.length == 3 || arguments.length == 4) {
xScale = Double.parseDouble(arguments[0]);
yScale = Double.parseDouble(arguments[1]);
zScale = Double.parseDouble(arguments[2]);
extent = arguments.length == 4 ? worldEdit.getTransformFactory().parseFromInput(arguments[3], context) : context.requireExtent();
} else {
return null;
}
return new ScaleTransform(extent, xScale, yScale, zScale);
}
Aggregations