mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@cd110a8 [ci skip] Update CONTRIBUTING.md (#10318) PaperMC/Paper@e603486 Add onboarding message for initial server start (#10312) PaperMC/Paper@d361a7f Fix DamageSource API (#10307) PaperMC/Paper@99a6416 Expand Hopper BlockState API (#10328)
This commit is contained in:
@@ -89,7 +89,7 @@ index 821dc4aeaf48460000682604fba51b340b9738e7..9882e89abcce1bf0b484424dd0a25bd3
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba600faaad 100644
|
||||
index b9104f6d6b8a9bd2415ed0349b43f76316ddea72..05cbad6c6637cb5250a91239612a5388006a728a 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
|
||||
@@ -124,7 +124,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1223,20 +1223,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1233,20 +1233,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
|
||||
@@ -150,7 +150,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
// Pufferfish start - tps catchup
|
||||
@@ -1257,8 +1257,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1267,8 +1267,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickRateManager.endTickWork();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1494,7 +1494,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -170,7 +170,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1557,7 +1557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1567,7 +1567,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (playerSaveInterval < 0) {
|
||||
playerSaveInterval = autosavePeriod;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1572,7 +1572,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1582,7 +1582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1585,7 +1585,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1595,7 +1595,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 b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1601,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1611,7 +1611,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 b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1683,11 +1683,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1693,11 +1693,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 b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1730,18 +1730,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1740,18 +1740,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.updateLagCompensationTick(); // Paper - lag compensation
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
@@ -244,7 +244,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1759,17 +1759,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1769,17 +1769,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1777,7 +1777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1787,7 +1787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -284,7 +284,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1805,7 +1805,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1803,7 +1803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1813,7 +1813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -302,7 +302,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1812,7 +1812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1822,7 +1822,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
}
|
||||
|
||||
public boolean isNetherEnabled() {
|
||||
@@ -2476,7 +2476,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2486,7 +2486,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -320,7 +320,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2716,7 +2716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2726,7 +2726,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -329,7 +329,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
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"));
|
||||
@@ -2726,40 +2726,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2736,40 +2736,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ index b1d2464fc151d4c636c3c2dc4e7b9446ff5dc0a0..8384f72d408f6f31c4c8a1ba47b8caba
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2808,15 +2808,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2818,15 +2818,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
@@ -1095,7 +1095,7 @@ index 2e6e8eac987c4ef6b2dcd3de592d8a51d2b29792..863343a87fe34d72f04af89d75268b47
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7f75528cd7d3d1e4df0af9ac6fc05a2bf3a1c7a9..35a73f5c73adcf596b2b1f43b55dff925f01d762 100644
|
||||
index 2ab6b860234ac4f7eaa9a83d73ef16e60dd4b58f..106bc557cbbd04814f9a43e3db83b6c8ea0e799b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -861,7 +861,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1800,7 +1800,7 @@ index ef7c67f591ca4a3c73b87a7c44b37ad0b51d875c..50202286a0d83f7fe5331eb669d99971
|
||||
this.assignProfessionWhenSpawned = false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index b678da2cbb93cea7971bc3c4d324cfca18b0bc97..908d8bbc2560073255d742ca11d59f8280bab895 100644
|
||||
index 90a82bd7977ebe520bdcc2ab99e11452d5cf4a21..5dcfb077fc58a92f32425aaafb82d6b41d488e13 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -675,7 +675,7 @@ public class Explosion {
|
||||
|
||||
Reference in New Issue
Block a user