Fix crash relating to "Already sent chunk"

Forgot to update the distandce field in the single user area map
on update, and additionally used the wrong radius (introduced
last commit) for the broadcast map
This commit is contained in:
Spottedleaf 2023-06-08 18:00:46 -07:00
parent 8c4fdb4e79
commit 65db359354

View File

@ -3205,7 +3205,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.player.connection.send(this.updateClientSimulationDistance(tickViewDistance));
+
+ // add to distance maps
+ this.broadcastMap.add(chunkX, chunkZ, sendViewDistance);
+ this.broadcastMap.add(chunkX, chunkZ, sendViewDistance + 1);
+ this.loadTicketCleanup.add(chunkX, chunkZ, loadViewDistance + 1);
+ this.tickMap.add(chunkX, chunkZ, tickViewDistance);
+
@ -3270,7 +3270,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ // update distance maps
+ this.broadcastMap.update(currentChunkX, currentChunkZ, sendViewDistance);
+ this.broadcastMap.update(currentChunkX, currentChunkZ, sendViewDistance + 1);
+ this.loadTicketCleanup.update(currentChunkX, currentChunkZ, loadViewDistance + 1);
+ this.tickMap.update(currentChunkX, currentChunkZ, tickViewDistance);
+ if (sendViewDistance > loadViewDistance || tickViewDistance > loadViewDistance) {
@ -3521,6 +3521,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ this.lastChunkX = toX;
+ this.lastChunkZ = toZ;
+ this.distance = newViewDistance;
+
+ final T parameter = this.parameter;
+