From 4754f660c753f096f4caa76b64eb1dee0fd5f389 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 8 Jan 2022 17:46:28 +0000 Subject: [PATCH] Fix #1524 Also brings in line with upstream --- .../java/com/sk89q/worldedit/command/ExpandCommands.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java index 73230bf89..b9823daac 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java @@ -104,11 +104,12 @@ public class ExpandCommands { private static void expandVert(LocalSession session, Actor actor, World world) throws IncompleteRegionException { Region region = session.getSelection(world); + int height = world.getMaxY() - world.getMinY(); try { long oldSize = region.getVolume(); region.expand( - BlockVector3.at(0, (world.getMaxY() + 1), 0), - BlockVector3.at(0, -(world.getMaxY() + 1), 0) + BlockVector3.at(0, height, 0), + BlockVector3.at(0, -height, 0) ); session.getRegionSelector(world).learnChanges(); long newSize = region.getVolume();