Updated Upstream (Paper & Pufferfish)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5e73c55 [ci skip] Add more identifying patch comments
PaperMC/Paper@3e20d3a [ci skip] Add more identifying patch comments
PaperMC/Paper@f61ebdc Fix issue with kick event causes being passed improperly
PaperMC/Paper@106c67a [ci skip] Add more identifying patch comments
PaperMC/Paper@cc693ce [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@eeb6afc [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@1c956ab [ci skip] Add more identifying patch comments, merge related patches
PaperMC/Paper@42e88a8 [ci skip] Add more identifying patch comments
PaperMC/Paper@8e41ef4 Add visual blockdata api for primed tnt (#10146)
PaperMC/Paper@68c3297 [ci skip] Add more identifying patch comments
PaperMC/Paper@4a98986 Add back Reduce allocation of Vec3D by entity tracker patch (#10179)
PaperMC/Paper@b48d737 Async world data IO saving (#10171)
PaperMC/Paper@8d94596 [ci skip] Add more identifying patch comments
PaperMC/Paper@f7dd304 [ci skip] Add more identifying patch comments
PaperMC/Paper@98e6d20 [ci skip] Add more identifying patch comments
PaperMC/Paper@e9e0bc1 [ci skip] Add more identifying patch comments
PaperMC/Paper@d9df6bc [ci skip] Add more patch identifying comments, cleanup
PaperMC/Paper@27cabc1 [ci skip] Add more patch identifying comments

Pufferfish Changes:
pufferfish-gg/Pufferfish@8e208d3 Fix Async World Saving attribution
This commit is contained in:
granny
2024-01-21 20:41:53 -08:00
parent 3d52f066c1
commit 236b06a2a3
84 changed files with 740 additions and 851 deletions

View File

@@ -43,7 +43,7 @@ index b66a7d4aab887309579154815a0d4abf9de506b0..e6f56bc5b129699bab60db9c97c7f73b
return executedUnloadTask | canSaveChunk | canSaveEntities | canSavePOI ? new SaveStat(executedUnloadTask || canSaveChunk, canSaveEntities, canSavePOI): null;
}
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
index c5c734b9eb80d1cdf0e9fd8a043f2b6d1f4cbffe..21c98c7511faed997c1352b0842c8795719dcc2b 100644
index 3e2d5dcd62775b6ed7c0ce0ba51a71b635b1d644..166cd0f8e72189d10e56cd7bc095409aa919840e 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -50,7 +50,7 @@ public class PacketUtils {
@@ -56,7 +56,7 @@ index c5c734b9eb80d1cdf0e9fd8a043f2b6d1f4cbffe..21c98c7511faed997c1352b0842c8795
} catch (Exception exception) {
label25:
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef117c6802c1 100644
index 01a235831914698850befd777ec8b012006a95ec..1818e844e94522c9239b9a5cad812c09adeba636 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1427,7 +1427,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -94,10 +94,10 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
- isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
+ //isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); // Purpur
// Paper end
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
@@ -1574,9 +1574,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end
// Paper end - Incremental chunk and player saving
io.papermc.paper.util.CachedLists.reset(); // Paper
// Paper start - move executeAll() into full server tick timing
- try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
@@ -106,7 +106,7 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
- }
+ //} // Purpur
// Paper end
// Paper start
// Paper start - Server Tick Events
long endTime = System.nanoTime();
@@ -1601,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.logTickTime(l - i);
@@ -139,7 +139,7 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
- MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
+ //MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper // Purpur
this.profiler.popPush("levels");
//Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
// CraftBukkit start
// Run tasks that are waiting on processing
@@ -154,17 +154,17 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
- MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
+ //MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper // Purpur
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - optimize time updates
// Paper start - Perf: Optimize time updates
for (final ServerLevel level : this.getAllLevels()) {
@@ -1716,7 +1716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end
// Paper end - Perf: Optimize time updates
- MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
+ //MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper // Purpur
this.isIteratingOverLevels = true; // Paper
Iterator iterator = this.getAllLevels().iterator(); // Paper - move down
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
@@ -1742,14 +1742,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.push("tick");
@@ -183,7 +183,7 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
@@ -1764,24 +1764,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.isIteratingOverLevels = false; // Paper
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
this.profiler.popPush("connection");
- MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
@@ -214,7 +214,7 @@ index 6cfdb98969b1461912c857b6b8ae38f532f3bc9e..5a7f1e27b9e4d36789a0a835fd81ef11
this.profiler.popPush("send chunks");
iterator = this.playerList.getPlayers().iterator();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 038cc16032070f3baa26abc474a7071f21fcafc3..5165d5bdc92e4bd47ba6107be7af780feb9eeb76 100644
index 5a4446c09ef016e9dfb16438089a6880f7da68d8..ef08907f151c660d6c069b276f9291e6080c24d8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -522,7 +522,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -223,7 +223,7 @@ index 038cc16032070f3baa26abc474a7071f21fcafc3..5165d5bdc92e4bd47ba6107be7af780f
public void handleConsoleInputs() {
- MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
+ //MinecraftTimings.serverCommandTimer.startTiming(); // Spigot // Purpur
// Paper start - use proper queue
// Paper start - Perf: use proper queue
ConsoleInput servercommand;
while ((servercommand = this.serverCommandQueue.poll()) != null) {
@@ -539,7 +539,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -236,7 +236,7 @@ index 038cc16032070f3baa26abc474a7071f21fcafc3..5165d5bdc92e4bd47ba6107be7af780f
@Override
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 5996b5ae5b53f2c9ed2c2c9f5a3c25e300f5e90f..c2a1a05ace909576a160574ea98f89d6fea15338 100644
index 6dfff1ce0ee0a314816a47fd9d89c609f9f3ac5c..a9f933cf827f7973e6b881b071108050b99f80f3 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -547,15 +547,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -259,7 +259,7 @@ index 5996b5ae5b53f2c9ed2c2c9f5a3c25e300f5e90f..c2a1a05ace909576a160574ea98f89d6
}
gameprofilerfiller.pop();
@@ -1155,24 +1155,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1151,24 +1151,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper start - optimised tracker
private final void processTrackQueue() {
@@ -288,7 +288,7 @@ index 5996b5ae5b53f2c9ed2c2c9f5a3c25e300f5e90f..c2a1a05ace909576a160574ea98f89d6
}
}
// Paper end - optimised tracker
@@ -1187,7 +1187,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1183,7 +1183,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@@ -297,7 +297,7 @@ index 5996b5ae5b53f2c9ed2c2c9f5a3c25e300f5e90f..c2a1a05ace909576a160574ea98f89d6
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
@@ -1212,17 +1212,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1208,17 +1208,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
@@ -319,13 +319,13 @@ index 5996b5ae5b53f2c9ed2c2c9f5a3c25e300f5e90f..c2a1a05ace909576a160574ea98f89d6
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380ad932e9c 100644
index ad8e79c72841ff80f8af3580d2cdb89c13f6d688..e828f3d14af21318a716b9eba4b9bf80e377b073 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -296,10 +296,10 @@ public class ServerChunkCache extends ChunkSource {
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system
// 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 - Add debug for sync chunk loads
- this.level.timings.syncChunkLoad.startTiming(); // Paper
+ //this.level.timings.syncChunkLoad.startTiming(); // Paper // Purpur
chunkproviderserver_b.managedBlock(completablefuture::isDone);
@@ -346,7 +346,7 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
+ //} // Paper - Timings // Purpur
}
// Paper start - duplicate save, but call incremental
// Paper start - Incremental chunk and player saving; duplicate save, but call incremental
public void saveIncrementally() {
this.runDistanceManagerUpdates();
- try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings
@@ -355,9 +355,9 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
- } // Paper - Timings
+ //} // Paper - Timings // Purpur
}
// Paper end
// Paper end - Incremental chunk and player saving
@@ -488,23 +488,23 @@ public class ServerChunkCache extends ChunkSource {
@@ -495,23 +495,23 @@ public class ServerChunkCache extends ChunkSource {
@Override
public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
this.level.getProfiler().push("purge");
@@ -387,7 +387,7 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
this.level.getProfiler().pop();
this.clearCache();
}
@@ -520,14 +520,14 @@ public class ServerChunkCache extends ChunkSource {
@@ -527,14 +527,14 @@ public class ServerChunkCache extends ChunkSource {
gameprofilerfiller.push("pollingChunks");
gameprofilerfiller.push("filteringLoadedChunks");
// Paper - optimise chunk tick iteration
@@ -402,18 +402,18 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
- this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
+ //this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
int k = this.distanceManager.getNaturalSpawnChunkCount();
// Paper start - per player mob spawning
// Paper start - Optional per player mob spawns
int naturalSpawnChunkCount = k;
@@ -557,7 +557,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -564,7 +564,7 @@ public class ServerChunkCache extends ChunkSource {
// Pufferfish end
}
// Paper end
// Paper end - Optional per player mob spawns
- this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
+ // this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
gameprofilerfiller.popPush("spawnAndTick");
@@ -666,19 +666,19 @@ public class ServerChunkCache extends ChunkSource {
@@ -673,19 +673,19 @@ public class ServerChunkCache extends ChunkSource {
}
}
// Paper end - optimise chunk tick iteration
@@ -437,7 +437,7 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
// Paper start - optimise chunk tick iteration
if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) {
it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<ChunkHolder> copy = this.chunkMap.needsChangeBroadcasting.clone();
@@ -692,7 +692,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -699,7 +699,7 @@ public class ServerChunkCache extends ChunkSource {
}
}
// Paper end - optimise chunk tick iteration
@@ -447,10 +447,10 @@ index 5cf74fe0214191d42e74fc104eba150a95894e0f..9f438b41b61ee1174d8f23bcb7d93380
gameprofilerfiller.pop();
gameprofilerfiller.pop();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694acbc5ed3b 100644
index e2c5a03bcf008db05e6170184c6167d2ca1555fb..0fe2457de7a6f3842ff80512dac1bd2d3bbc04aa 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -871,7 +871,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -866,7 +866,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
gameprofilerfiller.popPush("tickPending");
@@ -459,7 +459,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
if (!this.isDebug() && flag) {
j = this.getGameTime();
gameprofilerfiller.push("blockTicks");
@@ -880,24 +880,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -875,24 +875,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.fluidTicks.tick(j, 65536, this::tickFluid);
gameprofilerfiller.pop();
}
@@ -491,7 +491,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
}
this.handlingTick = false;
@@ -910,7 +910,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -905,7 +905,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (flag1 || this.emptyTime++ < 300) {
gameprofilerfiller.push("entities");
@@ -500,7 +500,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
if (this.dragonFight != null && flag) {
gameprofilerfiller.push("dragonFight");
this.dragonFight.tick();
@@ -918,7 +918,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -913,7 +913,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
@@ -509,7 +509,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
this.entityTickList.forEach((entity) -> {
entity.activatedPriorityReset = false; // Pufferfish - DAB
if (!entity.isRemoved()) {
@@ -959,8 +959,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -954,8 +954,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
});
@@ -520,7 +520,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
gameprofilerfiller.pop();
this.tickBlockEntities();
}
@@ -1104,7 +1104,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1099,7 +1099,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} // Paper
gameprofilerfiller.popPush("tickBlocks");
@@ -529,7 +529,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
if (randomTickSpeed > 0) {
// Paper start - optimize random block ticking
LevelChunkSection[] sections = chunk.getSections();
@@ -1138,7 +1138,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1133,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper end - optimise random block ticking
@@ -538,7 +538,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
gameprofilerfiller.pop();
}
@@ -1482,8 +1482,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1477,8 +1477,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot end
// Paper start- timings
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity);
@@ -549,7 +549,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
// Paper end - timings
entity.setOldPosAndRot();
ProfilerFiller gameprofilerfiller = this.getProfiler();
@@ -1499,7 +1499,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1494,7 +1494,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.postTick(); // CraftBukkit
} else { entity.inactiveTick(); } // Paper - EAR 2
this.getProfiler().pop();
@@ -558,7 +558,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {
@@ -1522,8 +1522,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1517,8 +1517,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
// Paper - EAR 2
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
@@ -569,7 +569,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
// Paper end
passenger.setOldPosAndRot();
++passenger.tickCount;
@@ -1553,7 +1553,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1548,7 +1548,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(passenger, entity2);
}
@@ -578,14 +578,14 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
}
} else {
passenger.stopRiding();
@@ -1573,14 +1573,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1568,14 +1568,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld()));
}
- try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) {
+ //try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) { // Purpur
if (doFull) {
this.saveLevelData(true); // Pufferfish
this.saveLevelData(true); // Paper - Write SavedData IO async
}
- this.timings.worldSaveChunks.startTiming(); // Paper
@@ -596,16 +596,16 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
// Copied from save()
// CraftBukkit start - moved from MinecraftServer.saveChunks
@@ -1592,7 +1592,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1587,7 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
}
// CraftBukkit end
- }
+ //} // Purpur
}
// Paper end
// Paper end - Incremental chunk and player saving
@@ -1606,7 +1606,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1601,7 +1601,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
@@ -614,7 +614,7 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
if (progressListener != null) {
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
}
@@ -1616,11 +1616,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1611,11 +1611,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
progressListener.progressStage(Component.translatable("menu.savingChunks"));
}
@@ -630,10 +630,10 @@ index d81fab38fccaf0e6a6164e2c7bb24fa4d97353a0..25e9bb866bb7c07c0a1f32a85441694a
} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1e9e035b873d9d1f5909ea6879f0a47c6eca47f9..35240470ee13099dcd857831cf2e863e53af52a7 100644
index b33d6d1fbf483d9293c7be317f3419e799abe84f..3451fc27983d6ae2bc53568843d9f87f4e456b57 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2462,7 +2462,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2457,7 +2457,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleCommand(String s) { // Paper - private -> public
org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
@@ -642,7 +642,7 @@ index 1e9e035b873d9d1f5909ea6879f0a47c6eca47f9..35240470ee13099dcd857831cf2e863e
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2472,7 +2472,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2467,7 +2467,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -651,7 +651,7 @@ index 1e9e035b873d9d1f5909ea6879f0a47c6eca47f9..35240470ee13099dcd857831cf2e863e
return;
}
@@ -2485,7 +2485,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2480,7 +2480,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@@ -661,7 +661,7 @@ index 1e9e035b873d9d1f5909ea6879f0a47c6eca47f9..35240470ee13099dcd857831cf2e863e
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 834d2e66850ea907b48f7c0f0c1f8ecc396762ca..ae8db4b212b85adff85c761b2e2083a6ccce7cea 100644
index d03b0efd15a77d54f23661ea0426d69dcf5b26aa..e2f58fe299694db1b8975a502b42c832ef23ffb9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1274,7 +1274,7 @@ public abstract class PlayerList {
@@ -675,7 +675,7 @@ index 834d2e66850ea907b48f7c0f0c1f8ecc396762ca..ae8db4b212b85adff85c761b2e2083a6
for (int i = 0; i < this.players.size(); ++i) {
@@ -1285,7 +1285,7 @@ public abstract class PlayerList {
}
// Paper end
// Paper end - Incremental chunk and player saving
}
- MinecraftTimings.savePlayers.stopTiming(); // Paper
+ //MinecraftTimings.savePlayers.stopTiming(); // Paper // Purpur
@@ -683,7 +683,7 @@ index 834d2e66850ea907b48f7c0f0c1f8ecc396762ca..ae8db4b212b85adff85c761b2e2083a6
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
index 57ef7fbba3028c28231abf7b7ae78aa019323536..651c156dc8a5aad04d461add02e22147af657d07 100644
index 1e71cde7cb7654f1c21ae5e27e2fad7b58f593eb..4f3a1c2bfaec6787c8fc62c7df13c512dfc2cb7a 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
@@ -58,9 +58,9 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
@@ -732,10 +732,10 @@ index fcdb9bde8e1605e30dde3e580491522d4b62cdc0..7094701d213c73ba47ace806962244c1
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 1df81be711afc2adeb6908c86c7952580f3c8f0a..ca3b05db0a1cfdbac1307ff95bacd1acb83cb616 100644
index 29ff1ca5180aee623cd56c7310c2c0843f9a0b0a..81dcd8d608ff1b882817e3992c8c93b56dff325f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1318,15 +1318,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1317,15 +1317,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
ProfilerFiller gameprofilerfiller = this.getProfiler();
gameprofilerfiller.push("blockEntities");
@@ -754,7 +754,7 @@ index 1df81be711afc2adeb6908c86c7952580f3c8f0a..ca3b05db0a1cfdbac1307ff95bacd1ac
// Spigot start
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
boolean flag = this.tickRateManager().runsNormally();
@@ -1355,7 +1355,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1354,7 +1354,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
this.blockEntityTickers.removeAll(toRemove);
@@ -764,7 +764,7 @@ index 1df81be711afc2adeb6908c86c7952580f3c8f0a..ca3b05db0a1cfdbac1307ff95bacd1ac
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
gameprofilerfiller.pop();
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 3fb96de68b93e8d33bd5ab9137e5d4facc94d788..9a0a16d09a4cda3c2303dabe70db6c3018f3dd08 100644
index 2c300e3769acf534ee3bed91663374eca0acf5df..4e786cd3bc65d762c122f61ccb450bcd0887a745 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -133,7 +133,7 @@ public final class NaturalSpawner {
@@ -786,7 +786,7 @@ index 3fb96de68b93e8d33bd5ab9137e5d4facc94d788..9a0a16d09a4cda3c2303dabe70db6c30
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 76a4708464d35dd7782b1032288b52d61ee8fffc..757dc4292d371e697f336c4665427b3b4a3aa73b 100644
index c3fb622845770bcee9ddd6ebbeee174b06ee16eb..134d2d56af71aceb1ca33d7bb708124655c5d319 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -799,7 +799,7 @@ public class LevelChunk extends ChunkAccess {
@@ -903,7 +903,7 @@ index b3e1adeb932da9b3bed16acd94e2f16da48a7c72..d3ec817e95628f1fc8be4a29c9a0f13c
// Paper end - add timings for scoreboard search
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index d85982831fabc4643d8273ea27cf6dd0d05fee7c..9357539c71e3a8408b1f055527ffd192b5f9f1d9 100644
index 1085d90f6db968760a52f9d00a25299618264c5f..9113c8ebff5e71f859a19f024969582052c57546 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -170,7 +170,7 @@ public class ActivationRange