Temporary fix for #1122

This commit is contained in:
dordsor21 2021-06-14 06:34:05 +01:00
parent d015e6b270
commit 256d7c4e5d
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -401,6 +401,10 @@ public class BlockTransformExtent extends ResettableExtent {
long[] directions = getDirections(property); long[] directions = getDirections(property);
if (directions != null) { if (directions != null) {
int oldIndex = property.getIndex(newMaskedId); 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); Integer newIndex = getNewStateIndex(transform, directions, oldIndex);
if (newIndex != null) { if (newIndex != null) {
newMaskedId = property.modifyIndex(newMaskedId, newIndex); newMaskedId = property.modifyIndex(newMaskedId, newIndex);