misc changes.

This commit is contained in:
MattBDev
2019-11-11 16:02:28 -05:00
parent 7aa0d9c122
commit a23a4e5496
71 changed files with 676 additions and 673 deletions

View File

@ -157,7 +157,7 @@ public class BrushCommands {
aliases = {"bb", "blend"},
desc = "Smooths and blends terrain",
descFooter = "Smooths and blends terrain\n" +
"Pic: https://i.imgur.com/cNUQUkj.png -> https://i.imgur.com/hFOFsNf.png"
"Pic: https://i.imgur.com/cNUQUkj.png https://i.imgur.com/hFOFsNf.png"
)
@CommandPermissions("worldedit.brush.blendball")
public void blendBallBrush(InjectedValueAccess context,
@ -203,7 +203,7 @@ public class BrushCommands {
@Command(
name = "circle",
desc = "Creates a circle which revolves around your facing direction"
desc = "Creates a circle, which revolves around your facing direction"
)
@CommandPermissions("worldedit.brush.sphere")
public void circleBrush(Player player, InjectedValueAccess context,
@ -285,7 +285,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.sweep")
public void sweepBrush(Player player, InjectedValueAccess context,
@Arg(name = "copies", desc = "int", def = "-1") int copies) throws WorldEditException {
@Arg(desc = "int", def = "-1") int copies) throws WorldEditException {
player.print(BBC.BRUSH_SPLINE.s());
set(context, new SweepBrush(copies));
}
@ -324,10 +324,11 @@ public class BrushCommands {
@CommandPermissions("worldedit.brush.surfacespline") // 0, 0, 0, 10, 0,
public void surfaceSpline(Player player, InjectedValueAccess context, Pattern fill,
@Arg(desc = "The radius to sample for blending", def = "0")
Expression radius, @Arg(name = "tension", desc = "double", def = "0") double tension,
@Arg(name = "bias", desc = "double", def = "0") double bias,
@Arg(name = "continuity", desc = "double", def = "0") double continuity,
@Arg(name = "quality", desc = "double", def = "10") double quality) throws WorldEditException {
Expression radius,
@Arg(desc = "double", def = "0") double tension,
@Arg(desc = "double", def = "0") double bias,
@Arg(desc = "double", def = "0") double continuity,
@Arg(desc = "double", def = "10") double quality) throws WorldEditException {
player.print(BBC.BRUSH_SPLINE.format(radius));
worldEdit.checkMaxBrushRadius(radius);
set(context,
@ -343,13 +344,13 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.rock")
public void blobBrush(InjectedValueAccess context, Pattern fill,
@Arg(name = "radius", desc = "Vector3", def = "10")
@Arg(desc = "Vector3", def = "10")
Vector3 radius,
@Arg(name = "sphericity", desc = "double", def = "100")
@Arg(desc = "double", def = "100")
double sphericity,
@Arg(name = "frequency", desc = "double", def = "30")
@Arg(desc = "double", def = "30")
double frequency,
@Arg(name = "amplitude", desc = "double", def = "50")
@Arg(desc = "double", def = "50")
double amplitude) throws WorldEditException {
double max = MathMan.max(radius.getX(), radius.getY(), radius.getZ());
worldEdit.checkMaxBrushRadius(max);
@ -424,10 +425,10 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.stencil")
public void stencilBrush(LocalSession session, InjectedValueAccess context, Pattern fill,
@Arg(name = "radius", desc = "Expression", def = "5") Expression radius,
@Arg(name = "image", desc = "String", def = "") String image,
@Arg(desc = "Expression", def = "5") Expression radius,
@Arg(desc = "String", def = "") String image,
@Arg(def = "0", desc = "rotation") @Range(min = 0, max = 360) int rotation,
@Arg(name = "yscale", desc = "double", def = "1") double yscale,
@Arg(desc = "double", def = "1") double yscale,
@Switch(name = 'w', desc = "Apply at maximum saturation") boolean onlyWhite,
@Switch(name = 'r', desc = "Apply random rotation") boolean randomRotate) throws WorldEditException, FileNotFoundException {
worldEdit.checkMaxBrushRadius(radius);
@ -454,7 +455,7 @@ public class BrushCommands {
descFooter = "Use a height map to paint any surface.\n")
@CommandPermissions("worldedit.brush.stencil")
public void imageBrush(LocalSession session, InjectedValueAccess context,
@Arg(name = "radius", desc = "Expression", def = "5")
@Arg(desc = "Expression", def = "5")
Expression radius,
ProvideBindings.ImageUri imageUri,
@Arg(def = "1", desc = "scale height") @Range(min = Double.MIN_NORMAL)
@ -487,7 +488,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.surface")
public void surfaceBrush(InjectedValueAccess context, Pattern fill,
@Arg(name = "radius", desc = "Expression", def = "5")
@Arg(desc = "Expression", def = "5")
Expression radius) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
set(context, new SurfaceSphereBrush()).setFill(fill).setSize(radius);
@ -501,16 +502,16 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.scatter")
public void scatterBrush(InjectedValueAccess context, Pattern fill,
@Arg(name = "radius", desc = "Expression", def = "5") Expression radius,
@Arg(name = "points", desc = "double", def = "5") double pointsOpt,
@Arg(name = "distance", desc = "double", def = "1") double distanceOpt,
@Arg(desc = "Expression", def = "5") Expression radius,
@Arg(desc = "double", def = "5") double points,
@Arg(desc = "double", def = "1") double distance,
@Switch(name = 'o', desc = "Overlay the block") boolean overlay) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
Brush brush;
if (overlay) {
brush = new ScatterOverlayBrush((int) pointsOpt, (int) distanceOpt);
brush = new ScatterOverlayBrush((int) points, (int) distance);
} else {
brush = new ScatterBrush((int) pointsOpt, (int) distanceOpt);
brush = new ScatterBrush((int) points, (int) distance);
}
set(context, brush).setSize(radius).setFill(fill);
}
@ -523,8 +524,8 @@ public class BrushCommands {
@CommandPermissions("worldedit.brush.populateschematic")
public void scatterSchemBrush(Player player, InjectedValueAccess context, Mask mask,
@Arg(name = "clipboard", desc = "Clipboard uri") String clipboardStr,
@Arg(name = "radius", desc = "Expression", def = "30") Expression radius,
@Arg(name = "density", desc = "double", def = "50") double density,
@Arg(desc = "Expression", def = "30") Expression radius,
@Arg(desc = "double", def = "50") double density,
@Switch(name = 'r', desc = "Apply random rotation") boolean rotate) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
try {
@ -555,7 +556,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.layer")
public void surfaceLayer(InjectedValueAccess context,
@Arg(name = "radius", desc = "Expression") Expression radius, List<BlockState> blockLayers) throws WorldEditException {
@Arg(desc = "Expression") Expression radius, List<BlockState> blockLayers) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
set(context, new LayerBrush(blockLayers.toArray(new BlockState[0]))).setSize(radius);
}
@ -570,12 +571,12 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.splatter")
public void splatterBrush(InjectedValueAccess context, Pattern fill,
@Arg(name = "radius", desc = "Expression", def = "5") Expression radius,
@Arg(name = "points", desc = "double", def = "1") double pointsOpt,
@Arg(name = "recursion", desc = "double", def = "5") double recursion,
@Arg(name = "solid", desc = "boolean", def = "true") boolean solid) throws WorldEditException {
@Arg(desc = "Expression", def = "5") Expression radius,
@Arg(desc = "double", def = "1") double points,
@Arg(desc = "double", def = "5") double recursion,
@Arg(desc = "boolean", def = "true") boolean solid) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
set(context, new SplatterBrush((int) pointsOpt, (int) recursion, solid)).setSize(radius).setFill(fill);
set(context, new SplatterBrush((int) points, (int) recursion, solid)).setSize(radius).setFill(fill);
}
@Command(
@ -590,7 +591,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.scattercommand")
public void scatterCommandBrush(Player player, InjectedValueAccess context,
@Arg(name = "radius", desc = "Expression") Expression radius, double points,
@Arg(desc = "Expression") Expression radius, double points,
double distance, List<String> commandStr) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
set(context,
@ -732,7 +733,7 @@ public class BrushCommands {
"Snow Pic: https://i.imgur.com/Hrzn0I4.png"
)
@CommandPermissions("worldedit.brush.height")
public void heightBrush(LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Arg(def = "0", desc = "rotation") @Range(min = 0, max = 360) int rotation, @Arg(name = "yscale", desc = "double", def = "1") double yscale, @Switch(name = 'r', desc = "TODO") boolean randomRotate, @Switch(name = 'l', desc = "TODO") boolean layers, @Switch(name = 's', desc = "TODO") boolean dontSmooth, InjectedValueAccess context) throws WorldEditException, FileNotFoundException {
public void heightBrush(LocalSession session, @Arg(desc = "Expression", def = "5") Expression radius, @Arg(desc = "String", def = "") String image, @Arg(def = "0", desc = "rotation") @Range(min = 0, max = 360) int rotation, @Arg(desc = "double", def = "1") double yscale, @Switch(name = 'r', desc = "TODO") boolean randomRotate, @Switch(name = 'l', desc = "TODO") boolean layers, @Switch(name = 's', desc = "TODO") boolean dontSmooth, InjectedValueAccess context) throws WorldEditException, FileNotFoundException {
terrainBrush(session, radius, image, rotation, yscale, false, randomRotate, layers, !dontSmooth, ScalableHeightMap.Shape.CONE, context);
}
@ -744,13 +745,13 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.height")
public void cliffBrush(LocalSession session,
@Arg(name = "radius", desc = "Expression", def = "5")
@Arg(desc = "Expression", def = "5")
Expression radius,
@Arg(name = "image", desc = "String", def = "")
@Arg(desc = "String", def = "")
String image,
@Arg(def = "0", desc = "rotation") @Step(90) @Range(min = 0, max = 360)
int rotation,
@Arg(name = "yscale", desc = "double", def = "1")
@Arg(desc = "double", def = "1")
double yscale,
@Switch(name = 'r', desc = "Enables random off-axis rotation")
boolean randomRotate,
@ -767,7 +768,7 @@ public class BrushCommands {
desc = "This brush raises or lowers land towards the clicked point"
)
@CommandPermissions("worldedit.brush.height")
public void flattenBrush(LocalSession session, @Arg(name = "radius", desc = "Expression", def = "5") Expression radius, @Arg(name = "image", desc = "String", def = "") String image, @Arg(def = "0", desc = "rotation") @Step(90) @Range(min = 0, max = 360) int rotation, @Arg(name = "yscale", desc = "double", def = "1") double yscale,
public void flattenBrush(LocalSession session, @Arg(desc = "Expression", def = "5") Expression radius, @Arg(desc = "String", def = "") String image, @Arg(def = "0", desc = "rotation") @Step(90) @Range(min = 0, max = 360) int rotation, @Arg(desc = "double", def = "1") double yscale,
@Switch(name = 'r', desc = "Enables random off-axis rotation")
boolean randomRotate,
@Switch(name = 'l', desc = "Will work on snow layers")
@ -778,7 +779,7 @@ public class BrushCommands {
}
private void terrainBrush(LocalSession session,
@Arg(name = "radius", desc = "Expression") Expression radius, String image, int rotation,
@Arg(desc = "Expression") Expression radius, String image, int rotation,
double yscale, boolean flat, boolean randomRotate, boolean layers, boolean smooth,
Shape shape, InjectedValueAccess context) throws WorldEditException, FileNotFoundException {
worldEdit.checkMaxBrushRadius(radius);
@ -826,7 +827,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.copy")
public void copy(Player player, LocalSession session, InjectedValueAccess context,
@Arg(name = "radius", desc = "Expression", def = "5") Expression radius,
@Arg(desc = "Expression", def = "5") Expression radius,
@Switch(name = 'r', desc = "Apply random rotation on paste") boolean randomRotate,
@Switch(name = 'a', desc = "Apply auto view based rotation on paste") boolean autoRotate) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
@ -847,7 +848,7 @@ public class BrushCommands {
)
@CommandPermissions("worldedit.brush.command")
public void command(InjectedValueAccess context,
@Arg(name = "radius", desc = "Expression") Expression radius,
@Arg(desc = "Expression") Expression radius,
@Arg(desc = "Command to run") List<String> input) throws WorldEditException {
worldEdit.checkMaxBrushRadius(radius);
String cmd = StringMan.join(input, " ");

View File

@ -189,7 +189,7 @@ public class GeneralCommands {
} else {
session.setUseServerCUI(true);
session.updateServerCUI(player);
player.print("Server CUI enabled. This only supports cuboid regions, with a maximum size of 32x32x32.");
player.print("Server CUI enabled. This only supports cuboid regions, with a maximum size of 32×32×32.");
}
}
@ -211,7 +211,7 @@ public class GeneralCommands {
@Command(
name = "gmask",
aliases = {"/gmask"},
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e., the blocks in the world).",
desc = "Set the global mask"
)
@CommandPermissions({"worldedit.global-mask", "worldedit.mask.global"})
@ -308,7 +308,7 @@ public class GeneralCommands {
@Command(
name = "/gtexture",
aliases = {"gtexture"},
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e. the blocks in the world).",
descFooter = "The global destination mask applies to all edits you do and masks based on the destination blocks (i.e., the blocks in the world).",
desc = "Set the global mask"
)
@CommandPermissions("worldedit.global-texture")
@ -368,7 +368,7 @@ public class GeneralCommands {
name = "/gsmask",
aliases = {"gsmask", "globalsourcemask", "/globalsourcemask"},
desc = "Set the global source mask",
descFooter = "The global source mask applies to all edits you do and masks based on the source blocks (e.g. the blocks in your clipboard)"
descFooter = "The global source mask applies to all edits you do and masks based on the source blocks (e.g., the blocks in your clipboard)"
)
@CommandPermissions({"worldedit.global-mask", "worldedit.mask.global"})
public void gsmask(Player player, LocalSession session, EditSession editSession, @Arg(desc = "The mask to set", def = "") Mask maskOpt) throws WorldEditException {

View File

@ -130,8 +130,8 @@ public class GenerationCommands {
)
@CommandPermissions("worldedit.generation.image")
@Logging(PLACEMENT)
public void image(Actor actor, LocalSession session, EditSession editSession, String argStr, @Arg(name = "randomize", desc = "boolean", def = "true") boolean randomize,
@Arg(desc = "TODO", def = "100") int threshold, @Arg(name = "dimensions", desc = "BlockVector2", def = "") BlockVector2 dimensions) throws WorldEditException, IOException {
public void image(Actor actor, LocalSession session, EditSession editSession, String argStr, @Arg(desc = "boolean", def = "true") boolean randomize,
@Arg(desc = "TODO", def = "100") int threshold, @Arg(desc = "BlockVector2", def = "") BlockVector2 dimensions) throws WorldEditException, IOException {
TextureUtil tu = Fawe.get().getCachedTextureUtil(randomize, 0, threshold);
URL url = new URL(argStr);
if (!url.getHost().equalsIgnoreCase("i.imgur.com") && !url.getHost().equalsIgnoreCase("empcraft.com")) {
@ -171,7 +171,7 @@ public class GenerationCommands {
)
@CommandPermissions("worldedit.generation.ore")
@Logging(PLACEMENT)
public void ore(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, Mask mask, Pattern material, @Arg(name="size", desc="Ore vein size") @Range(min = 0) int size, int freq, @Range(min = 0, max = 100) int rarity, @Range(min = 0, max = 255) int minY, @Range(min = 0, max = 255) int maxY, InjectedValueAccess context) throws WorldEditException {
public void ore(Actor actor, LocalSession session, EditSession editSession, @Selection Region region, Mask mask, Pattern material, @Arg(desc="Ore vein size") @Range(min = 0) int size, int freq, @Range(min = 0, max = 100) int rarity, @Range(min = 0, max = 255) int minY, @Range(min = 0, max = 255) int maxY, InjectedValueAccess context) throws WorldEditException {
actor.checkConfirmationRegion(() -> {
editSession.addOre(region, mask, material, size, freq, rarity, minY, maxY);
BBC.VISITOR_BLOCK.send(actor, editSession.getBlockChangeCount());
@ -190,7 +190,7 @@ public class GenerationCommands {
BlockVector2 radius,
@Arg(desc = "The height of the cylinder", def = "1")
int height,
@Range(min = 1) @Arg(name = "thickness", desc = "double", def = "1") double thickness, InjectedValueAccess context) throws WorldEditException {
@Range(min = 1) @Arg(desc = "double", def = "1") double thickness, InjectedValueAccess context) throws WorldEditException {
double max = MathMan.max(radius.getBlockX(), radius.getBlockZ());
worldEdit.checkMaxRadius(max);
BlockVector3 pos = session.getPlacementPosition(actor);
@ -274,15 +274,15 @@ public class GenerationCommands {
@CommandPermissions("worldedit.generation.forest")
@Logging(POSITION)
public int forestGen(Actor actor, LocalSession session, EditSession editSession,
@Arg(name = "size", desc = "The size of the forest, in blocks", def = "10")
int sizeOpt,
@Arg(desc = "The size of the forest, in blocks", def = "10")
int size,
@Arg(desc = "The type of forest", def = "tree")
TreeType type,
@Range(min = 0, max = 100) @Arg(desc = "The density of the forest, between 0 and 100", def = "5")
double density) throws WorldEditException {
checkCommandArgument(0 <= density && density <= 100, "Density must be between 0 and 100");
density /= 100;
int affected = editSession.makeForest(session.getPlacementPosition(actor), sizeOpt, density, type);
int affected = editSession.makeForest(session.getPlacementPosition(actor), size, density, type);
actor.print(affected + " trees created.");
return affected;
}
@ -294,8 +294,8 @@ public class GenerationCommands {
@CommandPermissions("worldedit.generation.pumpkins")
@Logging(POSITION)
public int pumpkins(Actor actor, LocalSession session, EditSession editSession,
@Arg(name = "size", desc = "The size of the patch", def = "10")
int sizeOpt,
@Arg(desc = "The size of the patch", def = "10")
int size,
@Arg(desc = "//TODO", def = "10")
int apothem,
@Arg(desc = "//TODO ", def = "0.02")

View File

@ -67,7 +67,7 @@ import org.enginehub.piston.annotation.param.Arg;
// descFooter = "Patterns determine what blocks are placed\n" +
// " - Use [brackets] for arguments\n" +
// " - Use , to OR multiple\n" +
// "e.g. #surfacespread[10][#existing],andesite\n" +
// "e.g., #surfacespread[10][#existing],andesite\n" +
// "More Info: https://git.io/vSPmA"
//)
@CommandContainer//(superTypes = CommandPermissionsConditionGenerator.Registration.class)
@ -78,7 +78,7 @@ public class PatternCommands {
aliases = {"#*", "*", ".*"},
desc = "Use the block that is already there"
)
public Pattern existing(Extent extent, @Arg(name = "properties", desc = "String", def = "") String properties) { // TODO FIXME , @Arg(name = "properties", desc = "String", def = "") String properties
public Pattern existing(Extent extent, @Arg(desc = "String", def = "") String properties) { // TODO FIXME , @Arg(name = "properties", desc = "String", def = "") String properties
if (properties == null) return new ExistingPattern(extent);
return new PropertyPattern(extent).addRegex(".*[" + properties + "]");
}
@ -119,16 +119,16 @@ public class PatternCommands {
name = "#anglecolor",
desc = "A darker block based on the existing terrain angle"
)
public Pattern anglecolor(Extent extent, LocalSession session, @Arg(name = "distance", desc = "int", def = "1") int distanceOpt) {
return new AngleColorPattern(extent, session, distanceOpt);
public Pattern anglecolor(Extent extent, LocalSession session, @Arg(desc = "int", def = "1") int distance) {
return new AngleColorPattern(extent, session, distance);
}
@Command(
name = "#angledata",
desc = "Block data based on the existing terrain angle"
)
public Pattern angledata(Extent extent, @Arg(name = "distance", desc = "int", def = "1") int distanceOpt) {
return new DataAnglePattern(extent, distanceOpt);
public Pattern angledata(Extent extent, @Arg(desc = "int", def = "1") int distance) {
return new DataAnglePattern(extent, distance);
}
@Command(
@ -153,7 +153,7 @@ public class PatternCommands {
name = "#desaturate",
desc = "Desaturated color of the existing block"
)
public Pattern desaturate(Extent extent, LocalSession session, @Arg(name = "percent", desc = "double", def = "100") double percent) {
public Pattern desaturate(Extent extent, LocalSession session, @Arg(desc = "double", def = "100") double percent) {
return new DesaturatePattern(extent, percent / 100d, session);
}
@ -177,7 +177,7 @@ public class PatternCommands {
name = "#fullcopy",
desc = "Places your full clipboard at each block"
)
public Pattern fullcopy(Player player, Extent extent, LocalSession session, @Arg(name = "location", desc = "String", def = "#copy") String location, @Arg(name = "rotate", desc = "boolean", def = "false") boolean rotate, @Arg(name = "flip", desc = "boolean", def = "false") boolean flip) throws EmptyClipboardException, InputParseException, IOException {
public Pattern fullcopy(Player player, Extent extent, LocalSession session, @Arg(desc = "String", def = "#copy") String location, @Arg(desc = "boolean", def = "false") boolean rotate, @Arg(desc = "boolean", def = "false") boolean flip) throws EmptyClipboardException, InputParseException, IOException {
List<ClipboardHolder> clipboards;
switch (location.toLowerCase()) {
case "#copy":
@ -313,14 +313,14 @@ public class PatternCommands {
name = "#offset",
desc = "Offset a pattern"
)
public Pattern offset(@Arg(name = "x", desc = "x offset") double x, @Arg(name = "y", desc = "y offset") double y, @Arg(name = "z", desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
public Pattern offset(@Arg(desc = "x offset") double x, @Arg(desc = "y offset") double y, @Arg(desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
return new OffsetPattern(pattern, (int) x, (int) y, (int) z);
}
@Command(
name = "#surfacespread",
desc = "Applies to only blocks on a surface. Selects a block from provided pattern with a given ranomized offset `[0, <distance>)`. e.g. Use `#existing` to randomly offset blocks in the world, or `#copy` to offset blocks in your clipboard"
desc = "Applies to only blocks on a surface. Selects a block from provided pattern with a given randomized offset `[0, <distance>)`. e.g., Use `#existing` to randomly offset blocks in the world, or `#copy` to offset blocks in your clipboard"
)
public Pattern surfacespread(@Arg(desc = "spread distance (blocks)") double distance, @Arg(desc = "Pattern")Pattern pattern) {
@ -331,7 +331,7 @@ public class PatternCommands {
name = "#solidspread",
desc = "Randomly spread solid blocks"
)
public Pattern solidspread(@Arg(name = "x", desc = "x offset") double x, @Arg(name = "y", desc = "y offset") double y, @Arg(name = "z", desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
public Pattern solidspread(@Arg(desc = "x offset") double x, @Arg(desc = "y offset") double y, @Arg(desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
return new SolidRandomOffsetPattern(pattern, (int) x, (int) y, (int) z);
}
@ -341,7 +341,7 @@ public class PatternCommands {
aliases = {"#randomoffset"},
desc = "Randomly spread blocks"
)
public Pattern spread(@Arg(name = "x", desc = "x offset") double x, @Arg(name = "y", desc = "y offset") double y, @Arg(name = "z", desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
public Pattern spread(@Arg(desc = "x offset") double x, @Arg(desc = "y offset") double y, @Arg(desc = "z offset") double z, @Arg(desc = "Pattern")Pattern pattern) {
return new RandomOffsetPattern(pattern, (int) x, (int) y, (int) z);
}

View File

@ -221,7 +221,7 @@ public class UtilityCommands {
descFooter = "Patterns determine what blocks are placed\n" +
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
"e.g. #surfacespread[10][#existing],andesite\n" +
"e.g., #surfacespread[10][#existing],andesite\n" +
"More Info: https://git.io/vSPmA"
)
@CommandQueued(false)
@ -237,7 +237,7 @@ public class UtilityCommands {
" - Use [brackets] for arguments\n" +
" - Use , to OR multiple\n" +
" - Use & to AND multiple\n" +
"e.g. >[stone,dirt],#light[0][5],$jungle\n" +
"e.g., >[stone,dirt],#light[0][5],$jungle\n" +
"More Info: https://git.io/v9r4K"
)
@CommandQueued(false)

View File

@ -20,6 +20,7 @@
package com.sk89q.worldedit.command.tool;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.slf4j.LoggerFactory.getLogger;
import com.boydti.fawe.Fawe;
import com.boydti.fawe.config.BBC;
@ -83,7 +84,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
// TODO:
// Serialize methods
// serialize BrushSettings (primary and secondary only if different)
// set transient values e.g. context
// set transient values e.g., context
public enum BrushAction {
PRIMARY,
@ -126,7 +127,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
}.getType();
Map<String, Object> root = gson.fromJson(json, type);
if (root == null) {
Fawe.debug("Failed to load " + json);
getLogger(BrushTool.class).debug("Failed to load " + json);
return new BrushTool();
}
Map<String, Object> primary = (Map<String, Object>) root.get("primary");