aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-01-24 11:55:36 +0100
committerNassim Jahnke <[email protected]>2024-01-24 11:55:36 +0100
commit51bef80755a18eb3fa58ba42b1926174d5e7a76d (patch)
tree9cb2d82efdc1e5465c0092784ffd455793b779ee /patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
parent11645e32689f9b2872d064e9c8d8199bc34e0354 (diff)
downloadPaper-51bef80755a18eb3fa58ba42b1926174d5e7a76d.tar.gz
Paper-51bef80755a18eb3fa58ba42b1926174d5e7a76d.zip
[ci skip] Remove removed patches
Diffstat (limited to 'patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch')
-rw-r--r--patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
deleted file mode 100644
index 302867667a..0000000000
--- a/patches/removed/1.19.2-legacy-chunksystem/0725-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Spottedleaf <[email protected]>
-Date: Sat, 19 Sep 2020 15:29:16 -0700
-Subject: [PATCH] Do not allow ticket level changes while unloading
- playerchunks
-
-Sync loading the chunk at this stage would cause it to load
-older data, as well as screwing our region state.
-
-diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index a3fceb2608b3be80941dfe2570999b270429e0c6..b34c90497a5492c289839ba74df9f2f27e29370e 100644
---- a/src/main/java/net/minecraft/server/level/ChunkMap.java
-+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -316,6 +316,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- }
- // Paper end
-
-+ boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks
- public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
- super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
- // Paper - don't copy
-@@ -731,6 +732,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
-
- @Nullable
- ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k) {
-+ if (this.unloadingPlayerChunk) { net.minecraft.server.MinecraftServer.LOGGER.error("Cannot tick distance manager while unloading playerchunks", new Throwable()); throw new IllegalStateException("Cannot tick distance manager while unloading playerchunks"); } // Paper
- if (k > ChunkMap.MAX_CHUNK_DISTANCE && level > ChunkMap.MAX_CHUNK_DISTANCE) {
- return holder;
- } else {
-@@ -945,6 +947,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- if (completablefuture1 != completablefuture) {
- this.scheduleUnload(pos, holder);
- } else {
-+ // Paper start - do not allow ticket level changes while unloading chunks
-+ org.spigotmc.AsyncCatcher.catchOp("playerchunk unload");
-+ boolean unloadingBefore = this.unloadingPlayerChunk;
-+ this.unloadingPlayerChunk = true;
-+ try {
-+ // Paper end - do not allow ticket level changes while unloading chunks
- // Paper start
- boolean removed;
- if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) {
-@@ -978,6 +986,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- } else if (removed) { // Paper start
- net.minecraft.server.ChunkSystem.onChunkHolderDelete(this.level, holder);
- } // Paper end
-+ } finally { this.unloadingPlayerChunk = unloadingBefore; } // Paper - do not allow ticket level changes while unloading chunks
-
- }
- };
-diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index f3ab1691948c46477888776d28791ce24e7aa93d..29ba8971ceffbac68290f6063a69c98065e9bcba 100644
---- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -632,6 +632,7 @@ public class ServerChunkCache extends ChunkSource {
-
- public boolean runDistanceManagerUpdates() {
- if (distanceManager.delayDistanceManagerTick) return false; // Paper - Chunk priority
-+ if (this.chunkMap.unloadingPlayerChunk) { LOGGER.error("Cannot tick distance manager while unloading playerchunks", new Throwable()); throw new IllegalStateException("Cannot tick distance manager while unloading playerchunks"); } // Paper
- boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
- boolean flag1 = this.chunkMap.promoteChunkMap();
-