Skip to content

Commit

Permalink
Client sometimes requests a lot of subchunks
Browse files Browse the repository at this point in the history
Alemiz112 committed Jun 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent cb1bdd6 commit a8a052f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public void serialize(ByteBuf buffer, BedrockCodecHelper helper, SubChunkRequest
public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, SubChunkRequestPacket packet) {
packet.setDimension(VarInts.readInt(buffer));
packet.setSubChunkPosition(helper.readVector3i(buffer));
helper.readArray(buffer, packet.getPositionOffsets(), ByteBuf::readIntLE, this::readSubChunkOffset);
helper.readArray(buffer, packet.getPositionOffsets(), ByteBuf::readIntLE, this::readSubChunkOffset, 2048); // Somehow client sometimes requests over 1000 sub chunks
}

protected void writeSubChunkOffset(ByteBuf buffer, Vector3i offsetPosition) {

0 comments on commit a8a052f

Please sign in to comment.