diff options
author | Spottedleaf <[email protected]> | 2021-08-25 19:16:27 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-26 02:16:27 +0000 |
commit | ba4cf68774472754159d45ea71f3273beb5743fd (patch) | |
tree | ab760cea19adaa827acf619a214e53e98644a0d2 /patches/server/0006-MC-Utils.patch | |
parent | 3773df24ce81173242bff99a2a9991f7a88a66b2 (diff) | |
download | Paper-ba4cf68774472754159d45ea71f3273beb5743fd.tar.gz Paper-ba4cf68774472754159d45ea71f3273beb5743fd.zip |
Readd chunk priority patch, including many chunk system fixes from tuinity (#6488)
Diffstat (limited to 'patches/server/0006-MC-Utils.patch')
-rw-r--r-- | patches/server/0006-MC-Utils.patch | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/patches/server/0006-MC-Utils.patch b/patches/server/0006-MC-Utils.patch index b64475fe72..9cc9b4c714 100644 --- a/patches/server/0006-MC-Utils.patch +++ b/patches/server/0006-MC-Utils.patch @@ -3079,7 +3079,7 @@ index e9d2034f0753670c2ce69cc93c7e98e89af65c87..2b62f4664f439808661d559dc99762bf @Override diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401efca995293 100644 +index 9591f50922343283597bad6d9ac17c175d8ae230..48c876381d75c66f24d59bd2c415dd7de293afee 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -44,6 +44,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana @@ -3090,7 +3090,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401ef public class ServerChunkCache extends ChunkSource { -@@ -66,6 +67,158 @@ public class ServerChunkCache extends ChunkSource { +@@ -66,6 +67,156 @@ public class ServerChunkCache extends ChunkSource { @Nullable @VisibleForDebug private NaturalSpawner.SpawnState lastSpawnState; @@ -3227,9 +3227,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401ef + + try { + if (onLoad != null) { -+ chunkMap.callbackExecutor.execute(() -> { -+ onLoad.accept(either == null ? null : either.left().orElse(null)); // indicate failure to the callback. -+ }); ++ onLoad.accept(either == null ? null : either.left().orElse(null)); // indicate failure to the callback. + } + } catch (Throwable thr) { + if (thr instanceof ThreadDeath) { @@ -3249,7 +3247,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401ef public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, boolean flag, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<DimensionDataStorage> supplier) { this.level = world; -@@ -127,6 +280,49 @@ public class ServerChunkCache extends ChunkSource { +@@ -127,6 +278,49 @@ public class ServerChunkCache extends ChunkSource { this.lastChunk[0] = chunk; } @@ -3299,7 +3297,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401ef @Nullable @Override public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) { -@@ -453,7 +649,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -453,7 +647,7 @@ public class ServerChunkCache extends ChunkSource { } this.level.getProfiler().popPush("broadcast"); |