Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-16 04:50:10 +01:00
Fix possible NPE in 1.17->1.16.4 bedrock at 0 emulation (#821)
Dieser Commit ist enthalten in:
Ursprung
7e08534f4f
Commit
c9d57aab8d
@ -364,6 +364,7 @@ public final class BlockItemPacketRewriter1_17 extends BackwardsItemRewriter<Cli
|
|||||||
|
|
||||||
if (ViaBackwards.getConfig().bedrockAtY0()) {
|
if (ViaBackwards.getConfig().bedrockAtY0()) {
|
||||||
final ChunkSection lowestSection = chunk.getSections()[0];
|
final ChunkSection lowestSection = chunk.getSections()[0];
|
||||||
|
if (lowestSection != null) {
|
||||||
final DataPalette blocks = lowestSection.palette(PaletteType.BLOCKS);
|
final DataPalette blocks = lowestSection.palette(PaletteType.BLOCKS);
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
@ -371,6 +372,7 @@ public final class BlockItemPacketRewriter1_17 extends BackwardsItemRewriter<Cli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
chunk.getBlockEntities().removeIf(compound -> {
|
chunk.getBlockEntities().removeIf(compound -> {
|
||||||
NumberTag tag = compound.getNumberTag("y");
|
NumberTag tag = compound.getNumberTag("y");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren