mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@09904fd Re-add legacy getChunkAtAsynchronously to ChunkProviderServer
This commit is contained in:
@@ -450,10 +450,10 @@ index cec58f0d7ac6bf73a0f7b418a595704b8b807425..56ec684bac1c29c99bac117e38d82db2
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849be2ed7a23 100644
|
||||
index 795691bcb61a7c2b4f903d8db3b6714908c78ac2..9e796ab10152d630fe78ec247d6b0c2689ae00ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -481,10 +481,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -483,10 +483,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.level, x1, z1);
|
||||
// Paper end
|
||||
com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x1, z1); // Paper - sync load info
|
||||
@@ -466,7 +466,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
this.distanceManager.clearPriorityTickets(pair); // Paper - Chunk priority
|
||||
this.distanceManager.clearUrgent(pair); // Paper - Chunk priority
|
||||
} // Paper
|
||||
@@ -648,7 +648,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -650,7 +650,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
|
||||
@@ -475,7 +475,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
||||
|
||||
@@ -658,7 +658,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -660,7 +660,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.clearCache();
|
||||
return true;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -676,17 +676,17 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -678,17 +678,17 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
public void save(boolean flush) {
|
||||
this.runDistanceManagerUpdates();
|
||||
@@ -506,7 +506,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -721,22 +721,22 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -723,22 +723,22 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@Override
|
||||
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
||||
this.level.getProfiler().push("purge");
|
||||
@@ -535,7 +535,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
this.level.getProfiler().pop();
|
||||
this.clearCache();
|
||||
}
|
||||
@@ -791,7 +791,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -793,7 +793,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||
|
||||
gameprofilerfiller.push("naturalSpawnCount");
|
||||
@@ -544,7 +544,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - per player mob spawning
|
||||
NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
||||
@@ -812,12 +812,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -814,12 +814,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Pufferfish end
|
||||
}
|
||||
// Paper end
|
||||
@@ -559,7 +559,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
|
||||
// Paper - moved down
|
||||
|
||||
@@ -871,17 +871,17 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -873,17 +873,17 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
// Paper end - optimise chunk tick iteration
|
||||
@@ -581,7 +581,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
||||
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
||||
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
||||
this.chunkMap.needsChangeBroadcasting.clear();
|
||||
@@ -893,7 +893,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -895,7 +895,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user