mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 00:49:31 +00:00
Updated Upstream (Gale/Purpur)
This commit is contained in:
@@ -935,7 +935,7 @@ index 57e76b53e5e314c3e6b8856010f7a84188121582..d6daa27a8d7aca00b181e90d789f4249
|
||||
} catch (Exception exception) {
|
||||
if (exception instanceof ReportedException) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814beb656b1 100644
|
||||
index 9b6e36894f545670c4581a8c8452c183336adf93..76837c0bd930980519faf8a49e639f35b823e031 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -184,8 +184,6 @@ import org.bukkit.craftbukkit.Main;
|
||||
@@ -955,7 +955,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
// Purpur start
|
||||
if (upnp) {
|
||||
if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) {
|
||||
@@ -1390,7 +1387,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1400,7 +1397,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
@@ -963,7 +963,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
|
||||
this.managedBlock(() -> {
|
||||
return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
|
||||
@@ -1471,8 +1467,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1481,8 +1477,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -972,7 +972,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
for (;;) {
|
||||
boolean moreTasks = this.tickMidTickTasks();
|
||||
long currTime = System.nanoTime();
|
||||
@@ -1497,9 +1491,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1507,9 +1501,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -982,7 +982,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
}
|
||||
// Paper end - execute chunk tasks mid tick
|
||||
|
||||
@@ -1572,15 +1563,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1582,15 +1573,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -1000,7 +1000,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
// Paper end
|
||||
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
|
||||
|
||||
@@ -1614,11 +1604,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1624,11 +1614,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
@@ -1013,7 +1013,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
// Paper start - Server Tick Events
|
||||
long endTime = System.nanoTime();
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
@@ -1638,7 +1624,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1648,7 +1634,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickMethodTime(i);
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -1021,7 +1021,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
}
|
||||
|
||||
private void logTickMethodTime(long tickStartTime) {
|
||||
@@ -1709,9 +1694,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1719,9 +1704,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
||||
entityplayer.connection.suspendFlushing();
|
||||
});
|
||||
@@ -1031,7 +1031,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
// Paper start - Folia scheduler API
|
||||
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
||||
getAllLevels().forEach(level -> {
|
||||
@@ -1727,20 +1710,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1737,20 +1720,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -1052,7 +1052,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - Perf: Optimize time updates
|
||||
for (final ServerLevel level : this.getAllLevels()) {
|
||||
@@ -1760,7 +1738,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1770,7 +1748,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Optimize time updates
|
||||
@@ -1060,7 +1060,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
|
||||
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
|
||||
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
|
||||
@@ -1779,14 +1756,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1789,14 +1766,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end */
|
||||
|
||||
try {
|
||||
@@ -1075,7 +1075,7 @@ index 20ec096a3a466f3b97e1723ffc5cc96848ce23e3..10e3eb23c00b2af646f198f789129814
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
|
||||
@@ -1798,21 +1773,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1808,21 +1783,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
|
||||
Reference in New Issue
Block a user