mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2025-02-22 02:51:51 +01:00
Fix possible NPE in 1.17->1.16.4 bedrock at 0 emulation (#821)
This commit is contained in:
parent
7e08534f4f
commit
c9d57aab8d
@ -364,10 +364,12 @@ public final class BlockItemPacketRewriter1_17 extends BackwardsItemRewriter<Cli
|
||||
|
||||
if (ViaBackwards.getConfig().bedrockAtY0()) {
|
||||
final ChunkSection lowestSection = chunk.getSections()[0];
|
||||
final DataPalette blocks = lowestSection.palette(PaletteType.BLOCKS);
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
blocks.setIdAt(x, 0, z, BEDROCK_BLOCK_STATE);
|
||||
if (lowestSection != null) {
|
||||
final DataPalette blocks = lowestSection.palette(PaletteType.BLOCKS);
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
blocks.setIdAt(x, 0, z, BEDROCK_BLOCK_STATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user