Remove simplify remote item matching stuff for now

Twas broken for some time and I haven't had time to address it, this may be revisited later in a different way
This commit is contained in:
Nassim Jahnke
2025-05-09 14:47:24 +02:00
parent d2ad2e668d
commit 358e72ec0d
7 changed files with 8 additions and 90 deletions

View File

@@ -18,7 +18,7 @@
@Nullable
private Vec3 startingToFallPosition;
@Nullable
@@ -281,6 +_,20 @@
@@ -281,6 +_,13 @@
}
}
@@ -28,26 +28,10 @@
+ ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(ServerPlayer.this.inventoryMenu.containerId, ServerPlayer.this.inventoryMenu.incrementStateId(), net.minecraft.world.inventory.InventoryMenu.SHIELD_SLOT, ServerPlayer.this.inventoryMenu.getSlot(net.minecraft.world.inventory.InventoryMenu.SHIELD_SLOT).getItem().copy()));
+ }
+ // Paper end - Sync offhand slot in menus
+
+ // Paper start - add flag to simplify remote matching logic
+ @Override
+ public ServerPlayer player() {
+ return ServerPlayer.this;
+ }
+ // Paper end - add flag to simplify remote matching logic
+
@Override
public void sendSlotChange(AbstractContainerMenu container, int slot, ItemStack itemStack) {
ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(container.containerId, container.incrementStateId(), slot, itemStack));
@@ -302,7 +_,7 @@
@Override
public RemoteSlot createSlot() {
- return new RemoteSlot.Synchronized(this.cache::getUnchecked);
+ return new RemoteSlot.Synchronized(this.cache::getUnchecked, ServerPlayer.this.getBukkitEntity().simplifyContainerDesyncCheck()); // Paper - add flag to simplify remote matching logic
}
};
private final ContainerListener containerListener = new ContainerListener() {
@@ -316,6 +_,32 @@
}
}