mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-28 19:11:45 +01:00
fix: do not cast block state to short (fixes #2543)
This commit is contained in:
parent
5174263f83
commit
d8c5831f4e
@ -211,7 +211,7 @@ public class DynamicChunk extends Chunk {
|
||||
final Section section = getSectionAt(y);
|
||||
final int blockStateId = section.blockPalette()
|
||||
.get(globalToSectionRelative(x), globalToSectionRelative(y), globalToSectionRelative(z));
|
||||
return Objects.requireNonNullElse(Block.fromStateId((short) blockStateId), Block.AIR);
|
||||
return Objects.requireNonNullElse(Block.fromStateId(blockStateId), Block.AIR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,7 +97,7 @@ public final class SnapshotImpl {
|
||||
final Section section = sections[globalToChunk(y) - minSection];
|
||||
final int blockStateId = section.blockPalette()
|
||||
.get(globalToSectionRelative(x), globalToSectionRelative(y), globalToSectionRelative(z));
|
||||
return Objects.requireNonNullElse(Block.fromStateId((short) blockStateId), Block.AIR);
|
||||
return Objects.requireNonNullElse(Block.fromStateId(blockStateId), Block.AIR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user