From 0bf6cfad8d6a2d06648045393a872bc1d31a2893 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Fri, 3 Jan 2020 16:51:23 -0500 Subject: [PATCH] Debug message for arrayoutofbounds --- .../com/boydti/fawe/beta/IBatchProcessor.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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; }