From 4aa9f7d35badf179403af3c975eb049d1539efb2 Mon Sep 17 00:00:00 2001 From: Elizabeth Jennifer Myers Date: Fri, 5 Aug 2011 15:34:05 -0400 Subject: [PATCH] EditSession: Fix hcyl height checks. The height check was incorrect for certain height/position combinations, causing the cyl to be the wrong length. Closes #119 --- src/main/java/com/sk89q/worldedit/EditSession.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 5735238e0..69012f837 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1689,7 +1689,8 @@ public class EditSession { pos = pos.subtract(0, height, 0); } - if (pos.getBlockY() - height - 1 < 0) { + // Only do this check if height is negative --Elizabeth + if (height < 0 && pos.getBlockY() - height - 1 < 0) { height = pos.getBlockY() + 1; } else if (pos.getBlockY() + height - 1 > 127) { height = 127 - pos.getBlockY() + 1;