Skip to content

Commit

Permalink
Client sometimes requests a lot of subchunks
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 committed Jun 11, 2024
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
Expand Up @@ -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) {
Expand Down

0 comments on commit a8a052f

Please sign in to comment.