convert applied source patches to file patch format

This commit is contained in:
granny
2025-05-30 19:06:47 -07:00
parent 312725553b
commit 3ba90894b1
183 changed files with 385 additions and 1852 deletions

View File

@@ -1,14 +1,6 @@
From 10208bcef5c949e133092f588296ebb6e22f36d8 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e61844572f47 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -283,6 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -284,6 +_,7 @@
public joptsimple.OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public static int currentTick; // Paper - improve tick loop
@@ -16,7 +8,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
// Paper - don't store the vanilla dispatcher
@@ -293,7 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -294,7 +_,7 @@
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
private static final int SAMPLE_INTERVAL = 20; // Paper - improve server tick loop
@Deprecated(forRemoval = true) // Paper
@@ -25,7 +17,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
// Spigot end
public volatile boolean hasFullyShutdown; // Paper - Improved watchdog support
public volatile boolean abnormalExit; // Paper - Improved watchdog support
@@ -302,6 +303,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -303,6 +_,8 @@
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
@@ -34,7 +26,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
@@ -993,6 +996,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -918,6 +_,15 @@
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -50,7 +42,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1091,6 +1103,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1012,6 +_,8 @@
this.safeShutdown(waitForServer, false);
}
public void safeShutdown(boolean waitForServer, boolean isRestarting) {
@@ -59,7 +51,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1110,6 +1124,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1031,6 +_,7 @@
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;
private long catchupTime = 0;
@@ -67,7 +59,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1195,6 +1210,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1116,6 +_,16 @@
}
// Paper end - Add onboarding message for initial server start
@@ -84,7 +76,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
while (this.running) {
long l;
if (!this.isPaused() && this.tickRateManager.isSprinting() && this.tickRateManager.checkShouldSprintThisTick()) {
@@ -1219,14 +1244,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1140,14 +_,19 @@
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
@@ -107,7 +99,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
tickSection = currentTime;
}
// Paper end - further improve server tick loop
@@ -1258,6 +1288,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1172,6 +_,12 @@
profilerFiller.popPush("nextTickWait");
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos);
@@ -120,7 +112,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
this.startMeasuringTaskExecutionTime();
this.waitUntilNextTick();
this.finishMeasuringTaskExecutionTime();
@@ -1688,7 +1724,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1581,7 +_,7 @@
long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) {
@@ -129,7 +121,7 @@ index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..924dc9a32cd78f37078ff47cde54e618
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1853,7 +1889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1745,7 +_,7 @@
@DontObfuscate
public String getServerModName() {