mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +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:
@@ -1,7 +1,7 @@
|
|||||||
group = org.purpurmc.purpur
|
group = org.purpurmc.purpur
|
||||||
version = 1.19.2-R0.1-SNAPSHOT
|
version = 1.19.2-R0.1-SNAPSHOT
|
||||||
|
|
||||||
paperCommit = e8c2c3bfda97143e33dbd35bd9dee528bb51d93c
|
paperCommit = 09904fd780175821a43adf74cc5a00d363e4a83d
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
@@ -2978,7 +2978,7 @@ index ca42c2642a729b90d22b968af7258f3aee72e14b..7613510e5f4c22ee15651f162fe1bca1
|
|||||||
public boolean visible = true;
|
public boolean visible = true;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af05090601 100644
|
index efcb80efc69a1e5ffc81b579bf535fd94e8144d7..795691bcb61a7c2b4f903d8db3b6714908c78ac2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -75,6 +75,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -75,6 +75,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
@@ -2991,7 +2991,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
|
|||||||
|
|
||||||
private static int getChunkCacheKey(int x, int z) {
|
private static int getChunkCacheKey(int x, int z) {
|
||||||
return x & 3 | ((z & 3) << 2);
|
return x & 3 | ((z & 3) << 2);
|
||||||
@@ -783,6 +786,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -785,6 +788,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||||
|
|
||||||
gameprofilerfiller.push("pollingChunks");
|
gameprofilerfiller.push("pollingChunks");
|
||||||
@@ -2999,7 +2999,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
|
|||||||
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
|
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
|
||||||
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||||
|
|
||||||
@@ -792,18 +796,25 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -794,18 +798,25 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
||||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
|
if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't count mobs when animals and monsters are disabled
|
||||||
@@ -3031,7 +3031,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
|
|||||||
gameprofilerfiller.popPush("filteringLoadedChunks");
|
gameprofilerfiller.popPush("filteringLoadedChunks");
|
||||||
// Paper - moved down
|
// Paper - moved down
|
||||||
this.level.timings.chunkTicks.startTiming(); // Paper
|
this.level.timings.chunkTicks.startTiming(); // Paper
|
||||||
@@ -841,8 +852,8 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -843,8 +854,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
if ((true || this.level.isNaturalSpawningAllowed(chunkcoordintpair)) && this.chunkMap.anyPlayerCloseEnoughForSpawning(holder, chunkcoordintpair, false)) { // Paper - optimise anyPlayerCloseEnoughForSpawning // Paper - replace player chunk loader system
|
if ((true || this.level.isNaturalSpawningAllowed(chunkcoordintpair)) && this.chunkMap.anyPlayerCloseEnoughForSpawning(holder, chunkcoordintpair, false)) { // Paper - optimise anyPlayerCloseEnoughForSpawning // Paper - replace player chunk loader system
|
||||||
chunk1.incrementInhabitedTime(j);
|
chunk1.incrementInhabitedTime(j);
|
||||||
@@ -3042,7 +3042,7 @@ index ea1b8f4fd49678f39b1036ae6be880bacc6997f8..40094f8ed5e04eed0378c68120c918af
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - replace player chunk loader system
|
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - replace player chunk loader system
|
||||||
@@ -904,6 +915,30 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -906,6 +917,30 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
// Paper end - controlled flush for entity tracker packets
|
// Paper end - controlled flush for entity tracker packets
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/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);
|
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.level, x1, z1);
|
||||||
// Paper end
|
// Paper end
|
||||||
com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x1, z1); // Paper - sync load info
|
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.clearPriorityTickets(pair); // Paper - Chunk priority
|
||||||
this.distanceManager.clearUrgent(pair); // Paper - Chunk priority
|
this.distanceManager.clearUrgent(pair); // Paper - Chunk priority
|
||||||
} // Paper
|
} // Paper
|
||||||
@@ -648,7 +648,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -650,7 +650,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
public boolean runDistanceManagerUpdates() {
|
public boolean runDistanceManagerUpdates() {
|
||||||
if (distanceManager.delayDistanceManagerTick) return false; // Paper - Chunk priority
|
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
|
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 flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
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();
|
this.clearCache();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -484,7 +484,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// 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) {
|
public void save(boolean flush) {
|
||||||
this.runDistanceManagerUpdates();
|
this.runDistanceManagerUpdates();
|
||||||
@@ -506,7 +506,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -721,22 +721,22 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -723,22 +723,22 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
@Override
|
@Override
|
||||||
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
|
||||||
this.level.getProfiler().push("purge");
|
this.level.getProfiler().push("purge");
|
||||||
@@ -535,7 +535,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
this.level.getProfiler().pop();
|
this.level.getProfiler().pop();
|
||||||
this.clearCache();
|
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
|
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");
|
gameprofilerfiller.push("naturalSpawnCount");
|
||||||
@@ -544,7 +544,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
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
|
// Pufferfish end
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -559,7 +559,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
|
|
||||||
// Paper - moved down
|
// 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
|
// Paper end - optimise chunk tick iteration
|
||||||
@@ -581,7 +581,7 @@ index 40094f8ed5e04eed0378c68120c918af05090601..6b4c502cf549996411ac21251e22849b
|
|||||||
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
||||||
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
||||||
this.chunkMap.needsChangeBroadcasting.clear();
|
this.chunkMap.needsChangeBroadcasting.clear();
|
||||||
@@ -893,7 +893,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -895,7 +895,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,10 +430,10 @@ index 56ec684bac1c29c99bac117e38d82db2b4dc20e8..e4cec79dc5911e1f000c63fe333eea04
|
|||||||
//try (co.aikar.timings.Timing ignored1 = this.level.timings.chunkSaveDataSerialization.startTiming()) { // Paper // Purpur
|
//try (co.aikar.timings.Timing ignored1 = this.level.timings.chunkSaveDataSerialization.startTiming()) { // Paper // Purpur
|
||||||
nbttagcompound = ChunkSerializer.write(this.level, chunk);
|
nbttagcompound = ChunkSerializer.write(this.level, chunk);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc9a5bf74c 100644
|
index 9e796ab10152d630fe78ec247d6b0c2689ae00ab..7d8f7ecad22cdcd39270af79af8e0cd83e07bbc1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -452,9 +452,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -454,9 +454,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
return ifLoaded;
|
return ifLoaded;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -445,7 +445,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
long k = ChunkPos.asLong(x, z);
|
long k = ChunkPos.asLong(x, z);
|
||||||
|
|
||||||
ChunkAccess ichunkaccess;
|
ChunkAccess ichunkaccess;
|
||||||
@@ -468,7 +468,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -470,7 +470,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create, true); // Paper
|
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create, true); // Paper
|
||||||
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
|
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
|
||||||
|
|
||||||
@@ -567,13 +567,13 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -569,13 +569,13 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.distanceManager.addTicket(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Paper - prevent plugin unloads from removing our ticket
|
this.distanceManager.addTicket(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Paper - prevent plugin unloads from removing our ticket
|
||||||
if (isUrgent) this.distanceManager.markUrgent(chunkcoordintpair); // Paper - Chunk priority
|
if (isUrgent) this.distanceManager.markUrgent(chunkcoordintpair); // Paper - Chunk priority
|
||||||
if (this.chunkAbsent(playerchunk, l)) {
|
if (this.chunkAbsent(playerchunk, l)) {
|
||||||
@@ -471,7 +471,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
if (this.chunkAbsent(playerchunk, l)) {
|
if (this.chunkAbsent(playerchunk, l)) {
|
||||||
this.distanceManager.removeTicket(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Paper
|
this.distanceManager.removeTicket(TicketType.REQUIRED_LOAD, chunkcoordintpair, l, identifier); // Paper
|
||||||
throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("No chunk holder after ticket has been added"));
|
throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("No chunk holder after ticket has been added"));
|
||||||
@@ -708,24 +708,24 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -710,24 +710,24 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
// CraftBukkit start - modelled on below
|
// CraftBukkit start - modelled on below
|
||||||
public void purgeUnload() {
|
public void purgeUnload() {
|
||||||
if (true) return; // Paper - tickets will be removed later, this behavior isn't really well accounted for by the chunk system
|
if (true) return; // Paper - tickets will be removed later, this behavior isn't really well accounted for by the chunk system
|
||||||
@@ -501,7 +501,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
if (tickChunks) {
|
if (tickChunks) {
|
||||||
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
|
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
|
||||||
this.chunkMap.playerChunkManager.tick(); // Paper - this is mostly is to account for view distance changes
|
this.chunkMap.playerChunkManager.tick(); // Paper - this is mostly is to account for view distance changes
|
||||||
@@ -734,10 +734,10 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -736,10 +736,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
|
//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
|
||||||
@@ -514,7 +514,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
this.clearCache();
|
this.clearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -783,14 +783,14 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -785,14 +785,14 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
// Paper end - optimize isOutisdeRange
|
// Paper end - optimize isOutisdeRange
|
||||||
LevelData worlddata = this.level.getLevelData();
|
LevelData worlddata = this.level.getLevelData();
|
||||||
@@ -532,7 +532,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
|
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
|
||||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
@@ -815,13 +815,13 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -817,13 +817,13 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
//this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
|
//this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
|
||||||
|
|
||||||
//this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
//this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
||||||
@@ -548,7 +548,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||||
|
|
||||||
// Paper - only shuffle if per-player mob spawning is disabled
|
// Paper - only shuffle if per-player mob spawning is disabled
|
||||||
@@ -872,15 +872,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -874,15 +874,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
// Paper end - optimise chunk tick iteration
|
// Paper end - optimise chunk tick iteration
|
||||||
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
|
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
|
||||||
@@ -567,7 +567,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
||||||
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
|
||||||
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
|
||||||
@@ -894,7 +894,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -896,7 +896,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
||||||
@@ -576,7 +576,7 @@ index 6b4c502cf549996411ac21251e22849be2ed7a23..25b9f739abba986264e9f59b5125c1cc
|
|||||||
// Paper end - use set of chunks requiring updates, rather than iterating every single one loaded
|
// Paper end - use set of chunks requiring updates, rather than iterating every single one loaded
|
||||||
// Paper start - controlled flush for entity tracker packets
|
// Paper start - controlled flush for entity tracker packets
|
||||||
List<net.minecraft.network.Connection> disabledFlushes = new java.util.ArrayList<>(this.level.players.size());
|
List<net.minecraft.network.Connection> disabledFlushes = new java.util.ArrayList<>(this.level.players.size());
|
||||||
@@ -1100,7 +1100,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -1102,7 +1102,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doRunTask(Runnable task) {
|
protected void doRunTask(Runnable task) {
|
||||||
|
|||||||
Reference in New Issue
Block a user