Skip to content

Commit

Permalink
fix: MC-263340 reintroduced when threaded worldgen is disabled
Browse files Browse the repository at this point in the history
Closes #267

Co-authored-by: Drex <nicknamedrex@gmail.com>
  • Loading branch information
ishland and DrexHD committed Feb 3, 2024
1 parent 5a0e879 commit 8f0dd51
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ public CompletableFuture<Either<Chunk, ChunkHolder.Unloaded>> runGenerationTask(
Finishable finishable = FlightProfiler.INSTANCE.startChunkGenerationProfiling(chunk.getPos(), world.getRegistryKey(), this.toString());
CompletableFuture<Either<Chunk, ChunkHolder.Unloaded>> completableFuture = this.generationTask.doWork(thiz, executor, world, generator, structureTemplateManager, lightingProvider, fullChunkConverter, chunks, chunk);
return completableFuture.thenApply((either) -> {
if (chunk instanceof ProtoChunk protoChunk && !protoChunk.getStatus().isAtLeast(thiz)) {
protoChunk.setStatus(thiz);
if (either.left().isPresent()) {
if (either.left().get() instanceof ProtoChunk protoChunk && !protoChunk.getStatus().isAtLeast(thiz)) {
protoChunk.setStatus(thiz);
}
}

if (finishable != null) {
Expand Down

0 comments on commit 8f0dd51

Please sign in to comment.