You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -23042,7 +23042,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
23042
23042
private static MinecraftServer SERVER; // Paper
23043
23043
public static final Logger LOGGER = LogUtils.getLogger();
23044
23044
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
23045
-
@@ -362,6 +362,93 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23045
+
@@ -370,6 +370,93 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23046
23046
return minecraftServer;
23047
23047
}
23048
23048
@@ -23136,7 +23136,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
23136
23136
public MinecraftServer(
23137
23137
// CraftBukkit start
23138
23138
joptsimple.OptionSet options,
23139
-
@@ -792,7 +879,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23139
+
@@ -800,7 +887,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23140
23140
serverLevel.setSpawnSettings(serverLevel.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && serverLevel.getGameRules().getBoolean(GameRules.RULE_SPAWN_MONSTERS)); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
23141
23141
this.updateEffectiveRespawnData();
23142
23142
this.forceTicks = false; // CraftBukkit
@@ -23145,7 +23145,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
23145
23145
new org.bukkit.event.world.WorldLoadEvent(serverLevel.getWorld()).callEvent(); // Paper - call WorldLoadEvent
23146
23146
}
23147
23147
23148
-
@@ -815,6 +902,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23148
+
@@ -823,6 +910,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23149
23149
public abstract boolean shouldRconBroadcast();
23150
23150
23151
23151
public boolean saveAllChunks(boolean suppressLogs, boolean flush, boolean force) {
@@ -23157,7 +23157,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
23157
23157
boolean flag = false;
23158
23158
23159
23159
for (ServerLevel serverLevel : this.getAllLevels()) {
23160
-
@@ -822,7 +914,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23160
+
@@ -830,7 +922,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23161
23161
LOGGER.info("Saving chunks for level '{}'/{}", serverLevel, serverLevel.dimension().location());
23162
23162
}
23163
23163
@@ -23166,7 +23166,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
23166
23166
flag = true;
23167
23167
}
23168
23168
23169
-
@@ -912,7 +1004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23169
+
@@ -920,7 +1012,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23170
23170
}
23171
23171
}
23172
23172
@@ -23175,7 +23175,7 @@ index f1ec0b9c3f8fe7811e36a66f8091a0a9f5a72d13..4eb16776b25aa4163949b00339971d78
Copy file name to clipboardExpand all lines: paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@
41
41
private int playerIdleTimeout;
42
42
private final long[] tickTimesNanos = new long[100];
43
43
private long aggregatedTickTimesNanos = 0L;
44
-
@@ -278,10 +_,78 @@
44
+
@@ -278,10 +_,86 @@
45
45
private final DiscontinuousFrame tickFrame;
46
46
private final PacketProcessor packetProcessor;
47
47
@@ -70,6 +70,7 @@
70
70
+ // Paper start - improve tick loop
71
71
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(1L));
72
72
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes5s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(5L));
73
+
+ public @Nullable ca.spottedleaf.moonrise.common.time.TickData.TickReportData tickReport5s;
73
74
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes10s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(10L));
74
75
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes15s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(15L));
75
76
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1m = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.MINUTES.toNanos(1L));
@@ -81,15 +82,18 @@
81
82
+ private long lastTickStart;
82
83
+ private long currentTickStart;
83
84
+ private long scheduledTickStart;
85
+
+ private double[] tps = new double[]{0.0, 0.0, 0.0};
0 commit comments