Updated Upstream(Folia)

This commit is contained in:
MrHua269
2024-12-03 16:42:17 +00:00
parent af556ab869
commit 27cd8d6cdb
6 changed files with 23 additions and 23 deletions

View File

@@ -18,7 +18,7 @@ index 48604e7f96adc9e226e034054c5e2bad0b024eb5..99f0c1e4d3437154a1062b0a8f94b7a0
return;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab663ab253 100644
index aa395491cba3f26eefb0e3bb7e51bd4348953f3e..420b0f22bb58cab43ff4b707bd40823ab2cad9bd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -808,8 +808,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -32,7 +32,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // Paper - reset invalid state for event fire below
io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS, io.papermc.paper.command.brigadier.PaperCommands.INSTANCE, org.bukkit.plugin.Plugin.class, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL); // Paper - call commands event for regular plugins
@@ -1124,7 +1124,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1125,7 +1125,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
// CraftBukkit start
if (this.server != null) {
@@ -41,7 +41,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
this.server.disablePlugins();
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
}
@@ -1344,7 +1344,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1345,7 +1345,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// tasks are default scheduled at -1 + delay, and first tick will tick at 1
final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time
LOGGER.info("Done ({})! For help, type \"help\"", String.format(java.util.Locale.ROOT, "%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time
@@ -50,7 +50,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
org.spigotmc.WatchdogThread.tick();
// Paper end - Improved Watchdog Support
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
@@ -1727,7 +1727,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1728,7 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
if (this.emptyTicks >= j) {
@@ -59,7 +59,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
if (this.emptyTicks == j) {
MinecraftServer.LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhileEmptySeconds());
this.autoSave();
@@ -1746,7 +1746,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1747,7 +1747,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - avoid issues with certain tasks not processing during sleep
// Folia - region threading
this.tickConnection();
@@ -69,7 +69,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
return;
}
}
@@ -1771,7 +1772,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1772,7 +1773,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
// Folia end - region threading
@@ -78,7 +78,7 @@ index 3e0fab30defa9bd92919219d47af02287364157e..d54b5a0c4efd25d2792ab0ff69985eab
new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper - Server Tick Events // Folia - region threading
// Folia start - region threading
if (region != null) {
@@ -1842,7 +1843,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1843,7 +1844,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long remaining = scheduledEnd - endTime; // Folia - region ticking
new com.destroystokyo.paper.event.server.ServerTickEndEvent((int)io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(), ((double)(endTime - startTime) / 1000000D), remaining).callEvent(); // Folia - region ticking
// Paper end - Server Tick Events