Compare commits

..

3 Commits

Author SHA1 Message Date
Bacteriawa a9f3c2c291 Fix PCA sync protocol for async portal transfers #166
Update the PCA sync protocol patch to use getHandleRaw() instead of getHandle() when syncing entities to clients. This ensures proper ownership checking when the owner is a destination-world clone being restored during an async portal transfer.
2026-08-10 18:09:24 +08:00
Helvetica Volubi c619486da9 fix: fix bot spawn problem 2026-08-09 03:24:54 +08:00
dependabot[bot] 5cd355881a [ci skip]Bump actions/setup-java from 5.6.0 to 5.7.0 (#171)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.6.0 to 5.7.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v5.6.0...v5.7.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 16:23:04 +08:00
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v7
- name: Set Up JDK
uses: actions/setup-java@v5.6.0
uses: actions/setup-java@v5.7.0
with:
distribution: zulu
java-version: 25
@@ -8,16 +8,18 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/252a16955f6e1e31a
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/SimpleContainer.java b/net/minecraft/world/SimpleContainer.java
index 0f412551685a8ea76be3b389e0782e57d22bb87c..6da0fd10e1a4a346dc1b073563e9bd8cf9b3c76d 100644
index 0f412551685a8ea76be3b389e0782e57d22bb87c..b6154f677943e22ecb6dfdd6f9b8f867f1c7f09a 100644
--- a/net/minecraft/world/SimpleContainer.java
+++ b/net/minecraft/world/SimpleContainer.java
@@ -199,6 +199,11 @@ public class SimpleContainer implements Container, StackedContentsCompatible {
@@ -199,6 +199,13 @@ public class SimpleContainer implements Container, StackedContentsCompatible {
@Override
public void setChanged() {
+ // Leaves start - PCA sync protocol
+ if (fun.bm.lophine.config.modules.function.protocol.PcaSyncProtocolConfig.enabled && this.getOwner() instanceof org.bukkit.craftbukkit.entity.CraftEntity entity) {
+ org.leavesmc.leaves.protocol.PcaSyncProtocol.syncEntityToClient(entity.getHandle());
+ // The owner can be a destination-world clone while it is being restored during an async portal transfer.
+ // syncEntityToClient() performs the ownership check and must receive the raw handle to reach it.
+ org.leavesmc.leaves.protocol.PcaSyncProtocol.syncEntityToClient(entity.getHandleRaw());
+ }
+ // Leaves end - PCA sync protocol
}
@@ -75,6 +75,10 @@ public class ServerBotPacketListenerImpl extends ServerGamePacketListenerImpl {
public void tick() {
}
@Override
public void flushChannel() {
}
@Override
public boolean isConnected() {
return true;