From 256d7c4e5df488916877718e0df2057628eb4108 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 14 Jun 2021 06:34:05 +0100 Subject: [PATCH] Temporary fix for #1122 --- .../worldedit/extent/transform/BlockTransformExtent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java index 87695fa60..aebbc4ea7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/transform/BlockTransformExtent.java @@ -401,6 +401,10 @@ public class BlockTransformExtent extends ResettableExtent { long[] directions = getDirections(property); if (directions != null) { int oldIndex = property.getIndex(newMaskedId); + if (oldIndex >= directions.length) { + LOGGER.warn(String.format("Index outside direction array length found for block:{%s} propery:{%s}", state.getBlockType().getId(), property.getName())); + continue; + } Integer newIndex = getNewStateIndex(transform, directions, oldIndex); if (newIndex != null) { newMaskedId = property.modifyIndex(newMaskedId, newIndex);