From 920095a2de0c223f6e59b3ef0cf2eb1c1ace2708 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 24 Aug 2017 12:07:51 +1000 Subject: [PATCH] Change hcyl default thickness --- .../main/java/com/boydti/fawe/object/mask/AngleMask.java | 2 +- .../com/sk89q/worldedit/command/GenerationCommands.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java b/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java index 94cc5220..d449a38b 100644 --- a/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java +++ b/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java @@ -55,7 +55,7 @@ public class AngleMask extends SolidBlockMask implements ResettableMask { private transient boolean lastValue; public int getHeight(int x, int y, int z) { - return lastY = getExtent().getNearestSurfaceTerrainBlock(x, z, y, 0, maxY); + return getExtent().getNearestSurfaceTerrainBlock(x, z, y, 0, maxY); // try { // int rx = x - cacheBotX + 16; // int rz = z - cacheBotZ + 16; diff --git a/core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java b/core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java index 45468e39..3fa0030d 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java @@ -184,13 +184,13 @@ public class GenerationCommands extends MethodCommands { ) @CommandPermissions("worldedit.generation.cylinder") @Logging(PLACEMENT) - public void hcyl(FawePlayer fp, Player player, LocalSession session, EditSession editSession, Pattern pattern, Vector2D radius, @Optional("1") int height, @Optional("1") int thickness, CommandContext context) throws WorldEditException, ParameterException { + public void hcyl(FawePlayer fp, Player player, LocalSession session, EditSession editSession, Pattern pattern, Vector2D radius, @Optional("1") int height, @Range(min = 1) @Optional("1") int thickness, CommandContext context) throws WorldEditException, ParameterException { double max = MathMan.max(radius.getBlockX(), radius.getBlockZ()); worldEdit.checkMaxBrushRadius(max); fp.checkConfirmationRadius(getArguments(context), (int) max); height = Math.min(256, height); Vector pos = session.getPlacementPosition(player); - int affected = editSession.makeHollowCylinder(pos, pattern, radius.getBlockX(), radius.getBlockZ(), height, thickness); + int affected = editSession.makeHollowCylinder(pos, pattern, radius.getBlockX(), radius.getBlockZ(), height, thickness - 1); BBC.VISITOR_BLOCK.send(fp, affected); } @@ -211,7 +211,7 @@ public class GenerationCommands extends MethodCommands { @Logging(PLACEMENT) public void cyl(FawePlayer fp, Player player, LocalSession session, EditSession editSession, Pattern pattern, Vector2D radius, @Optional("1") int height, @Switch('h') boolean hollow, CommandContext context) throws WorldEditException, ParameterException { double max = MathMan.max(radius.getBlockX(), radius.getBlockZ()); - worldEdit.checkMaxBrushRadius(max); + worldEdit.checkMaxRadius(max); fp.checkConfirmationRadius(getArguments(context), (int) max); height = Math.min(256, height); Vector pos = session.getPlacementPosition(player); @@ -254,7 +254,7 @@ public class GenerationCommands extends MethodCommands { @Logging(PLACEMENT) public void sphere(FawePlayer fp, Player player, LocalSession session, EditSession editSession, Pattern pattern, Vector radius, @Optional("false") boolean raised, @Switch('h') boolean hollow, CommandContext context) throws WorldEditException, ParameterException { double max = MathMan.max(radius.getBlockX(), radius.getBlockY(), radius.getBlockZ()); - worldEdit.checkMaxBrushRadius(max); + worldEdit.checkMaxRadius(max); fp.checkConfirmationRadius(getArguments(context), (int) max); Vector pos = session.getPlacementPosition(player);