diff options
author | Spottedleaf <[email protected]> | 2023-06-08 18:00:46 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2023-06-08 18:00:46 -0700 |
commit | 04509f0234dfd4c05be002de1985ab4915c2092c (patch) | |
tree | a723f92b76e90a60909e8f1f599215a27dd7891a | |
parent | 8ce5219e074e4ab0dc3ecb8c3f7ff9fdc4b527f8 (diff) | |
download | Paper-04509f0234dfd4c05be002de1985ab4915c2092c.tar.gz Paper-04509f0234dfd4c05be002de1985ab4915c2092c.zip |
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
-rw-r--r-- | patches/server/0019-Rewrite-chunk-system.patch | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/patches/server/0019-Rewrite-chunk-system.patch b/patches/server/0019-Rewrite-chunk-system.patch index 9e73938762..74ade37843 100644 --- a/patches/server/0019-Rewrite-chunk-system.patch +++ b/patches/server/0019-Rewrite-chunk-system.patch @@ -2310,10 +2310,10 @@ index 95eac2e12a16938d81ab512b00e90c5234b42834..8f7bf1f0400aeab8b7801d113d244d07 private ChunkSystem() { diff --git a/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java new file mode 100644 -index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a82ccc3f9 +index 0000000000000000000000000000000000000000..a642b02694eb50e21dee1c3dc0bc397c1712c71e --- /dev/null +++ b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java -@@ -0,0 +1,1417 @@ +@@ -0,0 +1,1418 @@ +package io.papermc.paper.chunk.system; + +import ca.spottedleaf.concurrentutil.collection.SRSWLinkedQueue; @@ -3205,7 +3205,7 @@ index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a + 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..c5507553d735bbb82cbbce0308138c5a + } + + // 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..c5507553d735bbb82cbbce0308138c5a + + this.lastChunkX = toX; + this.lastChunkZ = toZ; ++ this.distance = newViewDistance; + + final T parameter = this.parameter; + |