9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

fix synchronize carried item

This commit is contained in:
hayanesuru
2025-05-14 18:54:47 +09:00
parent c823590b66
commit b0515441aa

View File

@@ -33,7 +33,7 @@ index c1130f596cf3443eeb62eb1b12587172fe0859ee..18590e0b1d94ee3266637c5f3ab65ead
@Override
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
index 3dcd8df0b395a8fed8bc0cbe0ff78f4ae0056fd3..1e8a6b132926525fad405cbf3a2fab5d32e003e1 100644
index 3dcd8df0b395a8fed8bc0cbe0ff78f4ae0056fd3..f4c4998a4913358e5164b44eb78b4f3df04778d2 100644
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -306,7 +306,12 @@ public abstract class AbstractContainerMenu {
@@ -44,7 +44,7 @@ index 3dcd8df0b395a8fed8bc0cbe0ff78f4ae0056fd3..1e8a6b132926525fad405cbf3a2fab5d
+ // Leaf start - Hide specified item components - Avoid some frequent client animations
+ final boolean matchResult = org.dreeam.leaf.config.modules.gameplay.HideItemComponent.enabled
+ ? !org.dreeam.leaf.util.item.ItemStackStripper.matchesStripped(this.getCarried(), this.remoteCarried)
+ : ItemStack.matches(this.getCarried(), this.remoteCarried); // Paper - add flag to simplify remote matching logic
+ : !ItemStack.matches(this.getCarried(), this.remoteCarried); // Paper - add flag to simplify remote matching logic
+ if (matchResult) {
+ // Leaf end - Hide specified item components - Avoid some frequent client animations
this.remoteCarried = this.getCarried().copy();