mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
275173e538
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Tue, 28 Dec 2021 07:19:01 -0800
|
|
Subject: [PATCH] Execute chunk tasks fairly for worlds while waiting for next
|
|
tick
|
|
|
|
Currently, only the first world would have had tasks executed.
|
|
This might result in chunks loading far slower in the nether,
|
|
for example.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 91a66fb66e9df5d5878315afa9d357a388e6e837..934e948bb112bcfc69e656ac4c6a97f0a72d7b74 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1306,6 +1306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
|
return true;
|
|
} else {
|
|
+ boolean ret = false; // Paper - force execution of all worlds, do not just bias the first
|
|
if (this.haveTime()) {
|
|
Iterator iterator = this.getAllLevels().iterator();
|
|
|
|
@@ -1313,12 +1314,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
|
|
|
if (worldserver.getChunkSource().pollTask()) {
|
|
- return true;
|
|
+ ret = true; // Paper - force execution of all worlds, do not just bias the first
|
|
}
|
|
}
|
|
}
|
|
|
|
- return false;
|
|
+ return ret; // Paper - force execution of all worlds, do not just bias the first
|
|
}
|
|
}
|
|
|