mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
fix issue resulting from kenny's apatch addiction
This commit is contained in:
parent
35ee1fdded
commit
bb43f75ee6
3 changed files with 10 additions and 10 deletions
|
@ -37,14 +37,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
return (LevelChunk) list.get(list.size() / 2);
|
||||
});
|
||||
}, (runnable) -> {
|
||||
- this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable));
|
||||
+ this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, () -> ChunkMap.this.chunkLoadConversionCallbackExecutor.execute(runnable))); // Paper - delay running Chunk post processing until outside of the sorter to prevent a deadlock scenario when post processing causes another chunk request.
|
||||
});
|
||||
return completablefuture1;
|
||||
}
|
||||
}).thenApplyAsync((either) -> {
|
||||
return either.ifLeft((chunk) -> {
|
||||
chunk.postProcessGeneration();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
|
|
|
@ -14,13 +14,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerLoadedChunk(entityplayer, mutableobject, chunk);
|
||||
});
|
||||
|
||||
return chunk;
|
||||
});
|
||||
- }, (runnable) -> {
|
||||
- this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, () -> ChunkMap.this.chunkLoadConversionCallbackExecutor.execute(runnable))); // Paper - delay running Chunk post processing until outside of the sorter to prevent a deadlock scenario when post processing causes another chunk request.
|
||||
- this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable));
|
||||
- });
|
||||
+ }, this.mainThreadExecutor); // Paper - queue to execute immediately so this doesn't delay chunk unloading
|
||||
return completablefuture1;
|
||||
}
|
||||
|
||||
public int getTickingGenerated() {
|
||||
|
|
|
@ -1445,8 +1445,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- });
|
||||
+ // Paper - no-tick view distance - moved to Chunk neighbour update
|
||||
});
|
||||
}, this.mainThreadExecutor); // Paper - queue to execute immediately so this doesn't delay chunk unloading
|
||||
return completablefuture1;
|
||||
}, (runnable) -> {
|
||||
this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable));
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int k = this.viewDistance;
|
||||
|
||||
|
|
Loading…
Reference in a new issue