From 85133067dd901c3d7a0cec679ac3f8bd4b3bf470 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 21 Oct 2016 23:19:49 +1100 Subject: [PATCH] Fixes #338 --- core/src/main/java/com/sk89q/worldedit/EditSession.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/sk89q/worldedit/EditSession.java b/core/src/main/java/com/sk89q/worldedit/EditSession.java index 1b9594b3..d20bdcdb 100644 --- a/core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -786,6 +786,9 @@ public class EditSession extends AbstractWorld implements HasFaweQueue { @Override public BaseBlock getLazyBlock(final Vector position) { + if (position.y > maxY || position.y < 0) { + return nullBlock; + } return getLazyBlock((int) position.x, (int) position.y, (int) position.z); } @@ -794,7 +797,7 @@ public class EditSession extends AbstractWorld implements HasFaweQueue { } public BaseBlock getBlock(int x, int y, int z) { - return extent.getLazyBlock(x, y, z); + return getLazyBlock(x, y, z); } @Override