Skip to content

Commit

Permalink
update 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bea4dev committed Aug 21, 2024
1 parent 5148f2d commit 438292e
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions patches/api/0002-thread-api-2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0004-world-thread-patch-1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0011-world-threading.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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<TickTa
Expand All @@ -16,7 +16,7 @@ index 9325d6f95165a7cee00d7de736af723681cc16b4..215cb09e39cb1a9a0cd83ec4fbca2dc3
final long startTime = System.nanoTime();
if ((startTime - this.lastMidTickExecute) <= CHUNK_TASK_QUEUE_BACKOFF_MIN_TIME || (startTime - this.lastMidTickExecuteFailure) <= TASK_EXECUTION_FAILURE_BACKOFF) {
// it's shown to be bad to constantly hit the queue (chunk loads slow to a crawl), even if no tasks are executed.
@@ -1780,6 +1781,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1781,6 +1782,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
Expand All @@ -29,7 +29,7 @@ index 9325d6f95165a7cee00d7de736af723681cc16b4..215cb09e39cb1a9a0cd83ec4fbca2dc3
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 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<TickTa
@@ -1815,7 +1822,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] thread safe change dimension


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b736c92041455cf7ef9857fee3775874c0e44b64..04c939ade820a93d58f60777e750fa4101aeb9f7 100644
index e49cf7a8258ef07ad39bc52cdc2e934bf955a978..a64416868a9d244e8914689b8da9369d6f4ce972 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3780,6 +3780,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: bea4dev <[email protected]>
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
Expand All @@ -16,18 +16,18 @@ 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
}
+ org.bukkit.util.BoundingBox oldBox = this.player.getBukkitEntity().getBoundingBox(); // Chiyogami - parallel bridge

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;
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: bea4dev <[email protected]>
Date: Wed, 24 Jul 2024 21:23:09 +0900
Date: Wed, 21 Aug 2024 22:45:27 +0900
Subject: [PATCH] fix parallel bridge


Expand Down

0 comments on commit 438292e

Please sign in to comment.