From 9f1cc0674de6f2d9bfdfaccc5796789536531580 Mon Sep 17 00:00:00 2001 From: zml2008 Date: Sat, 11 Feb 2012 15:21:07 -0800 Subject: [PATCH] Fixed EditSession.makeCylinder's mimimum height check --- CHANGELOG.txt | 3 ++- src/main/java/com/sk89q/worldedit/EditSession.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bb765875f..055fb5d15 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,7 +12,8 @@ - Added bPermissions support - Update for new events system - Fixed /scriptname.js and no-double-slash settings not working - - Corrected usage message for maze.js + - Corrected usage message for maze.js + - Fixed mimimum height check for cylinder generation 5.1.1: - Fixed some compatibility issues with SpoutPlugin diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 756c7b3e7..db91269f3 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -2077,8 +2077,8 @@ public class EditSession { pos = pos.subtract(0, height, 0); } - if (pos.getBlockY() - height - 1 < 0) { - height = pos.getBlockY() + 1; + if (pos.getBlockY() < 0) { + pos = pos.setY(0); } else if (pos.getBlockY() + height - 1 > world.getMaxY()) { height = world.getMaxY() - pos.getBlockY() + 1; }