mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-19 07:27:37 +01:00
Execute chunk tasks while waiting for chunk load in isChunkGenerated
this shouldn't be needed as we are requesting EMPTY status, however there is a deeper issue that we will just work around for now fixes #10916
This commit is contained in:
parent
d23825aa56
commit
3b1c85b3a2
@ -6,10 +6,10 @@ Subject: [PATCH] Fix CraftWorld#isChunkGenerated
|
|||||||
The upstream implementation is returning true for non-full chunks.
|
The upstream implementation is returning true for non-full chunks.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index fe9e8d1d4ae1f7a4e8f4cf5688004fc969422b3c..95de729f0a02a202632ea85a4061607d632588e9 100644
|
index fe9e8d1d4ae1f7a4e8f4cf5688004fc969422b3c..1e7e8e0425dfde875bd79be4432eb7a092d70e4b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -367,11 +367,27 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -367,11 +367,28 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChunkGenerated(int x, int z) {
|
public boolean isChunkGenerated(int x, int z) {
|
||||||
@ -31,6 +31,7 @@ index fe9e8d1d4ae1f7a4e8f4cf5688004fc969422b3c..95de729f0a02a202632ea85a4061607d
|
|||||||
+ ca.spottedleaf.moonrise.patches.chunk_system.ChunkSystem.scheduleChunkLoad(
|
+ ca.spottedleaf.moonrise.patches.chunk_system.ChunkSystem.scheduleChunkLoad(
|
||||||
+ this.world, x, z, false, ChunkStatus.EMPTY, false, ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, future::complete
|
+ this.world, x, z, false, ChunkStatus.EMPTY, false, ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, future::complete
|
||||||
+ );
|
+ );
|
||||||
|
+ world.getChunkSource().mainThreadProcessor.managedBlock(future::isDone);
|
||||||
+ return future.thenApply(c -> {
|
+ return future.thenApply(c -> {
|
||||||
+ if (c != null) {
|
+ if (c != null) {
|
||||||
+ return c.getPersistedStatus() == ChunkStatus.FULL;
|
+ return c.getPersistedStatus() == ChunkStatus.FULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user