Fix AIOB exception when placing a block in y=256

This commit is contained in:
themode 2021-01-02 16:18:26 +01:00
parent 82631fc6f8
commit 8155845c90

View File

@ -269,7 +269,7 @@ public class PaletteStorage implements PublicCloneable<PaletteStorage> {
8191, 16383, 32767};
private static void setBlockAt(@NotNull PaletteStorage paletteStorage, int x, int y, int z, short blockId) {
if (!MathUtils.isBetween(y, 0, Chunk.CHUNK_SIZE_Y)) {
if (!MathUtils.isBetween(y, 0, Chunk.CHUNK_SIZE_Y - 1)) {
return;
}