From 65db359354b938a0b44d4e676ae7561e5fe41824 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 8 Jun 2023 18:00:46 -0700 Subject: [PATCH] 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 --- patches/server/Rewrite-chunk-system.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 06665db70b..981fcd3ef7 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -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; +