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
@@ -23017,7 +23033,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23017
23033
private static MinecraftServer SERVER; // Paper
23018
23034
public static final Logger LOGGER = LogUtils.getLogger();
23019
23035
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
23020
-
@@ -326,6 +326,77 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23036
+
@@ -362,6 +362,77 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23021
23037
return minecraftServer;
23022
23038
}
23023
23039
@@ -23095,7 +23111,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23095
23111
public MinecraftServer(
23096
23112
// CraftBukkit start
23097
23113
joptsimple.OptionSet options,
23098
-
@@ -756,7 +827,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23114
+
@@ -792,7 +863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23099
23115
serverLevel.setSpawnSettings(serverLevel.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && serverLevel.getGameRules().getBoolean(GameRules.RULE_SPAWN_MONSTERS)); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
23100
23116
this.updateEffectiveRespawnData();
23101
23117
this.forceTicks = false; // CraftBukkit
@@ -23104,7 +23120,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23104
23120
new org.bukkit.event.world.WorldLoadEvent(serverLevel.getWorld()).callEvent(); // Paper - call WorldLoadEvent
23105
23121
}
23106
23122
23107
-
@@ -779,6 +850,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23123
+
@@ -815,6 +886,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23108
23124
public abstract boolean shouldRconBroadcast();
23109
23125
23110
23126
public boolean saveAllChunks(boolean suppressLogs, boolean flush, boolean force) {
@@ -23116,7 +23132,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23116
23132
boolean flag = false;
23117
23133
23118
23134
for (ServerLevel serverLevel : this.getAllLevels()) {
23119
-
@@ -786,7 +862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23135
+
@@ -822,7 +898,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23120
23136
LOGGER.info("Saving chunks for level '{}'/{}", serverLevel, serverLevel.dimension().location());
23121
23137
}
23122
23138
@@ -23125,7 +23141,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23125
23141
flag = true;
23126
23142
}
23127
23143
23128
-
@@ -876,7 +952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23144
+
@@ -912,7 +988,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23129
23145
}
23130
23146
}
23131
23147
@@ -23134,7 +23150,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
for (ServerLevel serverLevelx : this.getAllLevels()) {
23137
-
@@ -886,18 +962,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23153
+
@@ -922,18 +998,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23138
23154
23139
23155
this.waitUntilNextTick();
23140
23156
}
@@ -23160,7 +23176,7 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23160
23176
23161
23177
this.isSaving = false;
23162
23178
this.resources.close();
23163
-
@@ -917,6 +989,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23179
+
@@ -953,6 +1025,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23164
23180
this.services().nameToIdCache().save(false); // Paper - Perf: Async GameProfileCache saving
23165
23181
}
23166
23182
// Spigot end
@@ -23175,9 +23191,44 @@ index 843229c35e5c198f335d47d520e6391c4569237f..a38d52b5b3c16b054332d38c44dfe28f
23175
23191
// Paper start - Improved watchdog support - move final shutdown items here
23176
23192
Util.shutdownExecutors();
23177
23193
try {
23178
-
@@ -1102,6 +1182,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23179
-
profilerFiller.push("tick");
23194
+
@@ -1045,16 +1125,31 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
23195
+
// execute small amounts of other tasks just in case the number of tasks we are
23196
+
// draining is large - chunk system and packet processing may be latency sensitive
23197
+
23198
+
- // TODO - Chunk System mid-tick
23199
+
+ ((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this).moonrise$executeMidTickTasks(); // Paper - rewrite chunk system
23200
+
this.packetProcessor.executeSinglePacket();
23201
+
}
23202
+
profiler.popPush("moonrise:run_all_packets");
23203
+
while (this.packetProcessor.executeSinglePacket()) {
23204
+
// execute possibly latency sensitive chunk system tasks (see above)
23205
+
- // TODO - Chunk System mid-tick
23206
+
+ ((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this).moonrise$executeMidTickTasks(); // Paper - rewrite chunk system
23207
+
}
23208
+
profiler.popPush("moonrise:run_all_chunk");
23209
+
- // TODO - Chunk System tasks
23210
+
+ // Paper start - rewrite chunk system
23211
+
+ for (final ServerLevel world : this.getAllLevels()) {
23212
+
+ profiler.push(world.toString() + " " + world.dimension().location()); // keep same formatting from regular tick, see tickChildren
23213
+
+
23214
+
+ // note: legacy tasks may expect a distance manager update
0 commit comments