Fixup sendAllDataToRemote calls

Reduces unnecessary item copies by a lot
This commit is contained in:
Nassim Jahnke
2025-07-06 21:59:50 +02:00
parent b4466ec981
commit a939945148
34 changed files with 141 additions and 123 deletions

View File

@@ -17,7 +17,7 @@
+ // Paper start - Sync offhand slot in menus
+ @Override
+ public void sendOffHandSlotChange() {
+ 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()));
+ this.sendSlotChange(ServerPlayer.this.inventoryMenu, 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
+