mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
* start 1.21.6 update * change workflow * apply some patches * set experimental to true * some compile fixes * Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@5d3463aa Updated Upstream (Paper) * Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@5d3463aa Updated Upstream (Paper) * remove data converter for 1.21.6; move clumps to unapplied * Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly * Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly * Update upstream * Update upstream * update to 1.21.6-pre4 * update patches * fix compile * set readme version to 1.21.6 * Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@439f15db Updated Upstream (Paper) PurpurMC/Purpur@46a28b93 [ci/skip] update version in README
44 lines
2.3 KiB
Diff
44 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sat, 1 Feb 2025 18:55:59 +0300
|
|
Subject: [PATCH] MSPT Tracking for each world
|
|
|
|
|
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
|
index 6f08d761ee52d65a57fd01cf7bffa461dc1b898b..d96f1b3312734b4daa86fd7ac133f3f5475375b4 100644
|
|
--- a/net/minecraft/server/MinecraftServer.java
|
|
+++ b/net/minecraft/server/MinecraftServer.java
|
|
@@ -1674,7 +1674,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
// DivineMC start - Parallel world ticking
|
|
private void tickLevel(ServerLevel serverLevel, BooleanSupplier hasTimeLeft) {
|
|
try {
|
|
+ // DivineMC start - MSPT Tracking for each world
|
|
+ long i = Util.getNanos();
|
|
serverLevel.tick(hasTimeLeft);
|
|
+ long j = Util.getNanos() - i;
|
|
+
|
|
+ serverLevel.tickTimes5s.add(this.tickCount, j);
|
|
+ serverLevel.tickTimes10s.add(this.tickCount, j);
|
|
+ serverLevel.tickTimes60s.add(this.tickCount, j);
|
|
+ // DivineMC end - MSPT Tracking for each world
|
|
} catch (Throwable levelTickingException) {
|
|
CrashReport crashReport = CrashReport.forThrowable(levelTickingException, "Exception ticking world");
|
|
serverLevel.fillReportDetails(crashReport);
|
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
|
index 0102d87411dcf0bba7f6873dc54385c957a7e2d7..c87d1ff6f55e2316686add55abebbc7d8ecab914 100644
|
|
--- a/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
|
@@ -570,6 +570,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
}
|
|
// Paper end - chunk tick iteration
|
|
|
|
+ // DivineMC start - MSPT Tracking for each world
|
|
+ public final MinecraftServer.TickTimes tickTimes5s = new MinecraftServer.TickTimes(100);
|
|
+ public final MinecraftServer.TickTimes tickTimes10s = new MinecraftServer.TickTimes(200);
|
|
+ public final MinecraftServer.TickTimes tickTimes60s = new MinecraftServer.TickTimes(1200);
|
|
+ // DivineMC end - MSPT Tracking for each world
|
|
+
|
|
public ServerLevel(
|
|
MinecraftServer server,
|
|
Executor dispatcher,
|