use of com.fastasyncworldedit.core.extent.transform.RandomOffsetTransform in project FastAsyncWorldEdit by IntellectualSites.
the class SpreadTransformParser method parseFromInput.
@Override
protected ResettableExtent parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException {
if (arguments.length != 3 && arguments.length != 4) {
return null;
}
int xOffset = Integer.parseInt(arguments[0]);
int yOffset = Integer.parseInt(arguments[1]);
int zOffset = Integer.parseInt(arguments[2]);
Extent extent = arguments.length == 4 ? worldEdit.getTransformFactory().parseFromInput(arguments[3], context) : context.requireExtent();
return new RandomOffsetTransform(extent, xOffset, yOffset, zOffset);
}
Aggregations