mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@a76998d Fix plugin loggers on shutdown (#5592)
This commit is contained in:
@@ -39,7 +39,7 @@ index edd378813873ed367784379b0f1666d1ccf2194d..eb4dac2239592d680ef31edf47f1ab66
|
||||
|
||||
return b0;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d549cbae714 100644
|
||||
index c340f7577435d59ae46455a2b94521bc401aeaa9..24f767663b1190dcada3da554375e3a01064c462 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -328,13 +328,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -74,7 +74,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Shutdown and don't bother finishing
|
||||
@@ -1200,18 +1200,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1201,18 +1201,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Spigot end
|
||||
|
||||
@@ -98,7 +98,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
this.mayHaveDelayedTasks = true;
|
||||
// Purpur start - tps catchup
|
||||
if (org.purpurmc.purpur.PurpurConfig.tpsCatchup) {
|
||||
@@ -1221,8 +1221,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1222,8 +1222,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Purpur end - tps catchup
|
||||
this.waitUntilNextTick();
|
||||
@@ -109,7 +109,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
||||
}
|
||||
@@ -1383,7 +1383,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1384,7 +1384,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -118,7 +118,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1468,7 +1468,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1469,7 +1469,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (playerSaveInterval < 0) {
|
||||
playerSaveInterval = autosavePeriod;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1483,7 +1483,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
// Paper end
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1496,7 +1496,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1497,7 +1497,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end
|
||||
@@ -145,7 +145,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
||||
@@ -1509,7 +1509,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1510,7 +1510,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
|
||||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
@@ -154,7 +154,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1518,11 +1518,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1519,11 +1519,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||
//MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -168,7 +168,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1563,18 +1563,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1564,18 +1564,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
||||
|
||||
@@ -192,7 +192,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1600,17 +1600,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1601,17 +1601,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1618,7 +1618,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1619,7 +1619,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1626,7 +1626,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1627,7 +1627,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -232,7 +232,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
}
|
||||
|
||||
public boolean isNetherEnabled() {
|
||||
@@ -2274,7 +2274,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2275,7 +2275,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -241,7 +241,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2514,7 +2514,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2515,7 +2515,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -250,7 +250,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
this.executeBlocking(() -> {
|
||||
this.saveDebugReport(path.resolve("server"));
|
||||
@@ -2524,40 +2524,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2525,40 +2525,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ index 3ac653f12287fd8ad8966017d3faab2541cfd3b6..3d30dbb66d05f76545e119243cba4d54
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2602,15 +2602,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2603,15 +2603,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
|
||||
Reference in New Issue
Block a user