mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-19 15:37:43 +01:00
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:
parent
8ce5219e07
commit
04509f0234
@ -2310,10 +2310,10 @@ index 95eac2e12a16938d81ab512b00e90c5234b42834..8f7bf1f0400aeab8b7801d113d244d07
|
|||||||
private ChunkSystem() {
|
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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a82ccc3f9
|
index 0000000000000000000000000000000000000000..a642b02694eb50e21dee1c3dc0bc397c1712c71e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java
|
+++ 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;
|
+package io.papermc.paper.chunk.system;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.collection.SRSWLinkedQueue;
|
+import ca.spottedleaf.concurrentutil.collection.SRSWLinkedQueue;
|
||||||
@ -3205,7 +3205,7 @@ index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a
|
|||||||
+ this.player.connection.send(this.updateClientSimulationDistance(tickViewDistance));
|
+ this.player.connection.send(this.updateClientSimulationDistance(tickViewDistance));
|
||||||
+
|
+
|
||||||
+ // add to distance maps
|
+ // 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.loadTicketCleanup.add(chunkX, chunkZ, loadViewDistance + 1);
|
||||||
+ this.tickMap.add(chunkX, chunkZ, tickViewDistance);
|
+ this.tickMap.add(chunkX, chunkZ, tickViewDistance);
|
||||||
+
|
+
|
||||||
@ -3270,7 +3270,7 @@ index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // update distance maps
|
+ // update distance maps
|
||||||
+ this.broadcastMap.update(currentChunkX, currentChunkZ, sendViewDistance);
|
+ this.broadcastMap.update(currentChunkX, currentChunkZ, sendViewDistance + 1);
|
||||||
+ this.loadTicketCleanup.update(currentChunkX, currentChunkZ, loadViewDistance + 1);
|
+ this.loadTicketCleanup.update(currentChunkX, currentChunkZ, loadViewDistance + 1);
|
||||||
+ this.tickMap.update(currentChunkX, currentChunkZ, tickViewDistance);
|
+ this.tickMap.update(currentChunkX, currentChunkZ, tickViewDistance);
|
||||||
+ if (sendViewDistance > loadViewDistance || tickViewDistance > loadViewDistance) {
|
+ if (sendViewDistance > loadViewDistance || tickViewDistance > loadViewDistance) {
|
||||||
@ -3521,6 +3521,7 @@ index 0000000000000000000000000000000000000000..c5507553d735bbb82cbbce0308138c5a
|
|||||||
+
|
+
|
||||||
+ this.lastChunkX = toX;
|
+ this.lastChunkX = toX;
|
||||||
+ this.lastChunkZ = toZ;
|
+ this.lastChunkZ = toZ;
|
||||||
|
+ this.distance = newViewDistance;
|
||||||
+
|
+
|
||||||
+ final T parameter = this.parameter;
|
+ final T parameter = this.parameter;
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user