diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/IBatchProcessor.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/IBatchProcessor.java index c07a60fa2..6af9d4591 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/IBatchProcessor.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/IBatchProcessor.java @@ -1,5 +1,6 @@ package com.boydti.fawe.beta; +import com.boydti.fawe.Fawe; import com.boydti.fawe.FaweCache; import com.boydti.fawe.beta.implementation.processors.EmptyBatchProcessor; import com.boydti.fawe.beta.implementation.processors.MultiBatchProcessor; @@ -65,12 +66,18 @@ public interface IBatchProcessor { } } } - int layer = (minY - 15) >> 4; - while (layer < (maxY + 15) >> 4) { - if (set.hasSection(layer)) { - return true; + try { + int layer = (minY - 15) >> 4; + while (layer < (maxY + 15) >> 4) { + if (set.hasSection(layer)) { + return true; + } + layer++; } - layer++; + } catch (ArrayIndexOutOfBoundsException exception) { + Fawe.imp().debug("minY = " + minY); + Fawe.imp().debug("layer = " + ((minY - 15) >> 4)); + exception.printStackTrace(); } return false; }