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 c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
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
-
@@ -370,6 +370,93 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23045
+
@@ -375,6 +375,93 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23046
23046
return minecraftServer;
23047
23047
}
23048
23048
@@ -23136,7 +23136,7 @@ index c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
23136
23136
public MinecraftServer(
23137
23137
// CraftBukkit start
23138
23138
joptsimple.OptionSet options,
23139
-
@@ -800,7 +887,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23139
+
@@ -805,7 +892,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 c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
23145
23145
new org.bukkit.event.world.WorldLoadEvent(serverLevel.getWorld()).callEvent(); // Paper - call WorldLoadEvent
23146
23146
}
23147
23147
23148
-
@@ -823,6 +910,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23148
+
@@ -828,6 +915,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 c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
23157
23157
boolean flag = false;
23158
23158
23159
23159
for (ServerLevel serverLevel : this.getAllLevels()) {
23160
-
@@ -830,7 +922,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23160
+
@@ -835,7 +927,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 c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
23166
23166
flag = true;
23167
23167
}
23168
23168
23169
-
@@ -920,7 +1012,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23169
+
@@ -925,7 +1017,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23170
23170
}
23171
23171
}
23172
23172
@@ -23175,7 +23175,7 @@ index c62892b4656366fbeb65847fbeec95965e49c767..4d074f6f3c123f6ee6c63dbc37732d67
Copy file name to clipboardExpand all lines: paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch
+9-4Lines changed: 9 additions & 4 deletions
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 +_,86 @@
44
+
@@ -278,10 +_,91 @@
45
45
private final DiscontinuousFrame tickFrame;
46
46
private final PacketProcessor packetProcessor;
47
47
@@ -70,7 +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));
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes10s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(10L));
75
75
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes15s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(15L));
76
76
+ public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1m = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.MINUTES.toNanos(1L));
@@ -82,9 +82,10 @@
82
82
+ private long lastTickStart;
83
83
+ private long currentTickStart;
84
84
+ private long scheduledTickStart;
85
-
+ private double[] tps = new double[]{0.0, 0.0, 0.0};
85
+
+ private volatile double[] tps = new double[]{0.0, 0.0, 0.0};
0 commit comments