9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-22 00:09:20 +00:00

Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e0ba395 Add missing plugin ticket comparator fixes #13130
PaperMC/Paper@21b4930 Fix diff in FlowingFluid#canPassThroughWall
PaperMC/Paper@dcd7847 Improve server tick loop
PaperMC/Paper@a4a7461 Rebase fixups
PaperMC/Paper@dc66e8c Return Server#getTPS over minute intervals instead of seconds
PaperMC/Paper@b63dc92 Restore currentTick counter increment as temp feature patch
PaperMC/Paper@523efa4 Flatten currentTick incr into file patches
PaperMC/Paper@4dcd837 Add CommandSourceStack to UnknownCommandEvent (#13083)
PaperMC/Paper@ffd5158 Update 1.21.9 reobf mappings data (#13135)
PaperMC/Paper@b4b1f11 [ci skip] Add docs for virtual createMerchant in MerchantInventoryViewBuilder#merchant (#13125)
PaperMC/Paper@b3d2158 Disable javadoc.io links
PaperMC/Paper@8483163 Yield millis from Bukkit#getAverageTickTime
This commit is contained in:
Samsuik
2025-10-06 20:35:12 +01:00
parent e629d9bceb
commit f194568a55
7 changed files with 30 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -307,6 +_,7 @@
@@ -299,6 +_,7 @@
public volatile boolean abnormalExit; // Paper - Improved watchdog support
public volatile Thread shutdownThread; // Paper - Improved watchdog support
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
@@ -8,7 +8,7 @@
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
@@ -326,6 +_,17 @@
@@ -362,6 +_,17 @@
thread.start();
return minecraftServer;
}
@@ -26,7 +26,7 @@
// Paper start - rewrite chunk system
private volatile Throwable chunkSystemCrash;
@@ -476,6 +_,10 @@
@@ -512,6 +_,10 @@
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end
this.paperConfigurations = services.paper().configurations(); // Paper - add paper configuration files
@@ -37,19 +37,23 @@
}
private void readScoreboard(DimensionDataStorage dataStorage) {
@@ -1155,6 +_,7 @@
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);
+ this.tickInformationCollector.levelData(this.levels.values(), currentTps.doubleValue()); // Sakura - track tick information
tps1.add(currentTps, diff);
tps5.add(currentTps, diff);
tps15.add(currentTps, diff);
@@ -1192,6 +_,7 @@
// Paper end - rewrite chunk system
@@ -1277,6 +_,11 @@
this.currentTickStart = tickStart;
++MinecraftServer.currentTick;
+ // Sakura start - track tick information
+ if (MinecraftServer.currentTick % 20 == 0) {
+ this.tickInformationCollector.levelData(this.levels.values(), getTPS(this.tickTimes1s, tickStart, l));
+ }
+ // Sakura end - track tick information
// Paper end - improve tick loop
boolean flag = l == 0L;
@@ -1303,6 +_,7 @@
this.tickFrame.end();
this.recordEndOfTick(); // Paper - improve tick loop
profilerFiller.popPush("nextTickWait");
+ this.tickInformationCollector.tickDuration((System.nanoTime() - currentTime) / 1_000_000L); // Sakura - track tick information
+ this.tickInformationCollector.tickDuration((System.nanoTime() - tickStart) / 1_000_000L); // Sakura - track tick information
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos);
this.startMeasuringTaskExecutionTime();