mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Fix flexible palette out of bounds
This commit is contained in:
parent
f13a7b49fa
commit
5afce81de5
@ -240,7 +240,7 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
|
||||
final int y = index >> shiftedDimensionBitCount;
|
||||
final int z = index >> dimensionBitCount & 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user