mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-05 23:11:36 +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 Section section = getSectionAt(y);
|
||||||
final int blockStateId = section.blockPalette()
|
final int blockStateId = section.blockPalette()
|
||||||
.get(globalToSectionRelative(x), globalToSectionRelative(y), globalToSectionRelative(z));
|
.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
|
@Override
|
||||||
|
@ -97,7 +97,7 @@ public final class SnapshotImpl {
|
|||||||
final Section section = sections[globalToChunk(y) - minSection];
|
final Section section = sections[globalToChunk(y) - minSection];
|
||||||
final int blockStateId = section.blockPalette()
|
final int blockStateId = section.blockPalette()
|
||||||
.get(globalToSectionRelative(x), globalToSectionRelative(y), globalToSectionRelative(z));
|
.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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user