mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Add TODO for leaf
This commit is contained in:
parent
bb43f75ee6
commit
c95b80ccc1
1 changed files with 31 additions and 0 deletions
|
@ -24,6 +24,37 @@ the executor so that the mailbox ChunkQueue is now considered empty.
|
|||
This successfully fixed a reoccurring and highly reproduceable crash
|
||||
for heightmaps.
|
||||
|
||||
TODO FOR LEAF: 1.18.2 changed this
|
||||
|
||||
OLD
|
||||
|
||||
CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture1 = completablefuture.thenApplyAsync((either) -> {
|
||||
return either.flatMap((list) -> {
|
||||
LevelChunk chunk = (LevelChunk) list.get(list.size() / 2);
|
||||
|
||||
chunk.postProcessGeneration();
|
||||
this.level.startTickingChunk(chunk);
|
||||
return Either.left(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.
|
||||
});
|
||||
|
||||
NEW
|
||||
|
||||
CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture1 = completablefuture.thenApplyAsync((either) -> {
|
||||
return either.mapLeft((list) -> {
|
||||
return (LevelChunk) list.get(list.size() / 2);
|
||||
});
|
||||
}, (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.
|
||||
}).thenApplyAsync((either) -> {
|
||||
return either.ifLeft((chunk) -> {
|
||||
chunk.postProcessGeneration();
|
||||
this.level.startTickingChunk(chunk);
|
||||
});
|
||||
}, this.mainThreadExecutor);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
|
|
Loading…
Reference in a new issue