mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-07 00:48:28 +01:00
Fix flexible palette out of bounds
(cherry picked from commit 5afce81de5
)
This commit is contained in:
parent
912fb34f17
commit
7b7f0308aa
@ -240,7 +240,7 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
|
|||||||
final int y = index >> shiftedDimensionBitCount;
|
final int y = index >> shiftedDimensionBitCount;
|
||||||
final int z = index >> dimensionBitCount & dimensionMinus;
|
final int z = index >> dimensionBitCount & dimensionMinus;
|
||||||
final int x = index & dimensionMinus;
|
final int x = index & dimensionMinus;
|
||||||
final int result = ids != null ? ids[paletteIndex] : paletteIndex;
|
final int result = ids != null && paletteIndex < ids.length ? ids[paletteIndex] : paletteIndex;
|
||||||
consumer.accept(x, y, z, result);
|
consumer.accept(x, y, z, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user