9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-21 15:59:26 +00:00

fix sending the sword blocking animation when block-with-swords is disabled

This commit is contained in:
Samsuik
2025-08-14 21:17:43 +01:00
parent bf7e63debc
commit f8a30242f3
3 changed files with 28 additions and 1 deletions

View File

@@ -1,5 +1,14 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -296,7 +_,7 @@
// Paper start - Sync offhand slot in menus
@Override
public void sendOffHandSlotChange() {
- 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());
+ this.sendSlotChange(ServerPlayer.this.inventoryMenu, net.minecraft.world.inventory.InventoryMenu.SHIELD_SLOT, ServerPlayer.this.inventoryMenu.getSlot(net.minecraft.world.inventory.InventoryMenu.SHIELD_SLOT).getItem().copyForPacket()); // Sakura - modify components sent to the client
}
// Paper end - Sync offhand slot in menus
@@ -429,6 +_,7 @@
public boolean isRealPlayer; // Paper
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent