Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix/1.20.40
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
Kas-tle authored Oct 27, 2023
2 parents 3bc6d16 + 8d2ebcf commit baa57f3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void translate(GeyserSession session, ClientboundLevelChunkWithLightPacke
int maxBedrockSectionY = (bedrockDimension.height() >> 4) - 1;

int sectionCount;
int subChunkCount;
byte[] payload;
ByteBuf byteBuf = null;
GeyserChunkSection[] sections = new GeyserChunkSection[javaChunks.length - (yOffset + (bedrockDimension.minY() >> 4))];
Expand Down Expand Up @@ -475,6 +476,7 @@ public void translate(GeyserSession session, ClientboundLevelChunkWithLightPacke
GeyserChunkSection section = sections[i];
if (section != null) {
section.writeToNetwork(byteBuf);
subChunkCount++;
}
// We can ignore empty sections with subchunk v9
}
Expand Down Expand Up @@ -516,7 +518,7 @@ public void translate(GeyserSession session, ClientboundLevelChunkWithLightPacke
}

LevelChunkPacket levelChunkPacket = new LevelChunkPacket();
levelChunkPacket.setSubChunksLength(sectionCount);
levelChunkPacket.setSubChunksLength(subChunkCount);
levelChunkPacket.setCachingEnabled(false);
levelChunkPacket.setChunkX(packet.getX());
levelChunkPacket.setChunkZ(packet.getZ());
Expand Down

0 comments on commit baa57f3

Please sign in to comment.