mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b03f255 Finish moving patches back and improving compilable state
This commit is contained in:
@@ -89,10 +89,10 @@ index 821dc4aeaf48460000682604fba51b340b9738e7..3aa2ce6a2a3d3cdfc372a60419a09f49
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784da645b38e 100644
|
||||
index 08404289bd032d94fc02c33b7c4c7c544ca86db8..c54df5f7d65b68ed98fef408e3684f2ed2ab1b9e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -341,13 +341,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -342,13 +342,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
SERVER = this; // Paper - better singleton
|
||||
@@ -112,7 +112,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
this.random = RandomSource.create();
|
||||
this.port = -1;
|
||||
this.levels = Maps.newLinkedHashMap();
|
||||
@@ -966,9 +966,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -967,9 +967,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
@@ -124,7 +124,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1219,20 +1219,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1223,20 +1223,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
|
||||
@@ -136,7 +136,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
+ }*/ // Purpur
|
||||
|
||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
lastTick = curTime;
|
||||
lastTick = currentTime;
|
||||
this.nextTickTimeNanos += i;
|
||||
- this.startMetricsRecordingTick();
|
||||
- this.profiler.push("tick");
|
||||
@@ -150,7 +150,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
// Pufferfish start - tps catchup
|
||||
@@ -1253,8 +1253,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1257,8 +1257,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickRateManager.endTickWork();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1480,7 +1480,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -170,7 +170,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1553,7 +1553,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1557,7 +1557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (playerSaveInterval < 0) {
|
||||
playerSaveInterval = autosavePeriod;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1568,7 +1568,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1572,7 +1572,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1581,7 +1581,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1585,7 +1585,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 - Server Tick Events
|
||||
@@ -197,7 +197,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1597,7 +1597,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1601,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickTime(l - i);
|
||||
@@ -206,7 +206,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1679,11 +1679,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1683,11 +1683,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -220,7 +220,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1726,18 +1726,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1730,18 +1730,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
@@ -244,7 +244,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1755,17 +1755,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1759,17 +1759,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1773,7 +1773,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1777,7 +1777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1781,7 +1781,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -284,7 +284,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1791,7 +1791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1799,7 +1799,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1803,7 +1803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -302,7 +302,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1808,7 +1808,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1812,7 +1812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
}
|
||||
|
||||
public boolean isNetherEnabled() {
|
||||
@@ -2472,7 +2472,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2476,7 +2476,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -320,7 +320,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2712,7 +2712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2716,7 +2716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -329,7 +329,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
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"));
|
||||
@@ -2722,40 +2722,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2726,40 +2726,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ index 22659bfb081a022ed0f7ffb67293e3584ba7fff4..101c57df8b77827b78dd5423715f784d
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2804,15 +2804,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2808,15 +2808,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
|
||||
Reference in New Issue
Block a user