From 438292e696572f4af670e1d504723ef7abca29c2 Mon Sep 17 00:00:00 2001 From: bea4dev Date: Wed, 21 Aug 2024 23:13:24 +0900 Subject: [PATCH] update 1.21.1 --- README.md | 4 ++-- gradle.properties | 6 +++--- patches/api/0002-thread-api-2.patch | 8 ++++---- patches/server/0004-world-thread-patch-1.patch | 4 ++-- patches/server/0011-world-threading.patch | 6 +++--- ...=> 0014-thread-safe-change-dimension.patch} | 2 +- ...tch => 0015-thread-safe-command-exec.patch} | 0 ...tch => 0016-spark-with-world-threads.patch} | 0 ....patch => 0017-world-thread-watchdog.patch} | 0 ...bridge.patch => 0018-parallel-bridge.patch} | 18 +++++++++--------- ...ge.patch => 0019-fix-parallel-bridge.patch} | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) rename patches/server/{0015-thread-safe-change-dimension.patch => 0014-thread-safe-change-dimension.patch} (96%) rename patches/server/{0017-thread-safe-command-exec.patch => 0015-thread-safe-command-exec.patch} (100%) rename patches/server/{0018-spark-with-world-threads.patch => 0016-spark-with-world-threads.patch} (100%) rename patches/server/{0019-world-thread-watchdog.patch => 0017-world-thread-watchdog.patch} (100%) rename patches/server/{0014-parallel-bridge.patch => 0018-parallel-bridge.patch} (83%) rename patches/server/{0016-fix-parallel-bridge.patch => 0019-fix-parallel-bridge.patch} (97%) diff --git a/README.md b/README.md index 7a96349..4ca8a31 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Chiyogamiは [Paper](https://github.com/PaperMC/Paper) をフォークしたも Other versions ------ -* [1.20.2](https://github.com/bea4dev/Chiyogami/tree/ver/1.20.2) -* [1.19.2](https://github.com/bea4dev/Chiyogami/tree/ver/1.19.2) +* [1.21.1](https://github.com/bea4dev/Chiyogami/tree/ver/1.21.1) +* [1.21](https://github.com/bea4dev/Chiyogami/tree/ver/1.21) Notes ------ diff --git a/gradle.properties b/gradle.properties index 233e039..45f29c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=com.github.bea4dev -version=1.21-R0.1-SNAPSHOT +version=1.21.1-R0.1-SNAPSHOT -mcVersion=1.21 -paperRef=aa36ae65764f652a16517a994e8d9cf4a89136c8 +mcVersion=1.21.1 +paperRef=2fdb2e9dcdfb127cb99134f9bec60dcc2a6954d2 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0002-thread-api-2.patch b/patches/api/0002-thread-api-2.patch index b61d67c..d50e2dd 100644 --- a/patches/api/0002-thread-api-2.patch +++ b/patches/api/0002-thread-api-2.patch @@ -5,10 +5,10 @@ Subject: [PATCH] thread api 2 diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 4705c1d91e39fcc3c608b1f1a38a30d063ccf06e..bf312e0ded6ea7bc506c6ff74695bbd7266ee6e6 100644 +index 419c056faf0d49d9b0435feb01252e87e227b9a9..a8e70825d7e6acd1a03dc3dc109072012e66abd4 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2045,6 +2045,29 @@ public final class Bukkit { +@@ -2056,6 +2056,29 @@ public final class Bukkit { public static boolean isPrimaryThread() { return server.isPrimaryThread(); } @@ -39,10 +39,10 @@ index 4705c1d91e39fcc3c608b1f1a38a30d063ccf06e..bf312e0ded6ea7bc506c6ff74695bbd7 // Paper start /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index c043d239c449bf4bb13a24467f2f6c67b4d28d2d..81fa57a2c56e8e51038c432e45fb31dbdd4e9300 100644 +index 5aa64ea39ebd92e5067c53cea49a8685c0b9eee4..624162ee7d4530473f9afa676836f69331eefebe 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1751,6 +1751,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1762,6 +1762,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * false otherwise */ boolean isPrimaryThread(); diff --git a/patches/server/0004-world-thread-patch-1.patch b/patches/server/0004-world-thread-patch-1.patch index 37ab4f8..4871df5 100644 --- a/patches/server/0004-world-thread-patch-1.patch +++ b/patches/server/0004-world-thread-patch-1.patch @@ -17,10 +17,10 @@ index e2a0487089eb5a7bdc1433e4c75f69d8e9f9d5f9..d49fbc94976de47efe023c3688e3fb06 private int skyDarken; protected int randValue = RandomSource.create().nextInt(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 362ca138a5cd5ad19f1300015c2571794adc3649..9e54d43ab2f69e124e71ff2cdbdf2fa077c6b126 100644 +index ffd284f0e25c6f20672f7225aafd37e6c87ccf03..5d08442e7c18a0be7eb66c017e5bce846eb5eaaa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2475,4 +2475,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2470,4 +2470,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.adventure$pointers; } // Paper end diff --git a/patches/server/0011-world-threading.patch b/patches/server/0011-world-threading.patch index 56d8025..56c805e 100644 --- a/patches/server/0011-world-threading.patch +++ b/patches/server/0011-world-threading.patch @@ -5,7 +5,7 @@ Subject: [PATCH] world threading diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9325d6f95165a7cee00d7de736af723681cc16b4..215cb09e39cb1a9a0cd83ec4fbca2dc3b25b58cd 100644 +index 23ddd26af762c1cd7fb3920669abb96b3213ab37..835bd0fad47b437dd51f9b8386d0764b92cc99bd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -382,6 +382,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - BlockPhysicsEvent worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers -@@ -1814,7 +1821,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Wed, 24 Jul 2024 19:58:10 +0900 +Date: Wed, 21 Aug 2024 22:44:18 +0900 Subject: [PATCH] parallel bridge diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7796e191747be545e744564a2b0b65790f69114d..ac2b7cb77c48804fd5e1c313ece29a90e60de7f1 100644 +index b13057c0792067cc6b0abdf0d64a9be2cc9389a4..10c02831bb7095702f81425aedf1d7c7508da206 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -260,6 +260,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -16,7 +16,7 @@ index 7796e191747be545e744564a2b0b65790f69114d..ac2b7cb77c48804fd5e1c313ece29a90 public final PlayerChunkSender chunkSender; private int tickCount; private int ackBlockChangesUpTo = -1; -@@ -1424,6 +1425,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1457,6 +1458,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } // Paper end - Add PlayerJumpEvent } @@ -24,10 +24,10 @@ index 7796e191747be545e744564a2b0b65790f69114d..ac2b7cb77c48804fd5e1c313ece29a90 boolean flag2 = this.player.verticalCollisionBelow; -@@ -1460,6 +1462,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - - // Paper start - Add fail move event - boolean teleportBack = !this.player.noPhysics && !this.player.isSleeping() && (movedWrongly && worldserver.noCollision(this.player, axisalignedbb) || this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2)); +@@ -1503,6 +1505,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox); + } // else: no collision at all detected, why do we care? + } + // Chiyogami start - parallel bridge + if (teleportBack) { + world.chiyogami.bridge.ParallelEntityMoveHandler moveHandler = this.parallelEntityMoveHandler; @@ -36,11 +36,11 @@ index 7796e191747be545e744564a2b0b65790f69114d..ac2b7cb77c48804fd5e1c313ece29a90 + teleportBack = moveHandler.tryToMoveBoundingBox(oldBox, movement); + } + } // Chiyogami end + // Paper end - optimise out extra getCubes if (teleportBack) { io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.CLIPPED_INTO_BLOCK, - toX, toY, toZ, toYaw, toPitch, false); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 43eeb8ce4bc350c2b524ade11ca25d8d4d21bea5..a009f452ae0b22a26d05c38a323e90c76ab95c5c 100644 +index 0368d6ba9cc9fe557d3c7172a87a7a5b15445e47..f6ce1b5a0226c3198cb762b69426c51da3eab807 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -345,6 +345,7 @@ public abstract class PlayerList { diff --git a/patches/server/0016-fix-parallel-bridge.patch b/patches/server/0019-fix-parallel-bridge.patch similarity index 97% rename from patches/server/0016-fix-parallel-bridge.patch rename to patches/server/0019-fix-parallel-bridge.patch index 91cfdf3..e0e671f 100644 --- a/patches/server/0016-fix-parallel-bridge.patch +++ b/patches/server/0019-fix-parallel-bridge.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: bea4dev -Date: Wed, 24 Jul 2024 21:23:09 +0900 +Date: Wed, 21 Aug 2024 22:45:27 +0900 Subject: [PATCH] fix parallel bridge