9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

进一步修复hand

This commit is contained in:
XiaoMoMi
2025-12-15 17:44:02 +08:00
parent d9e23519b6
commit 754fc1a1e7
3 changed files with 4 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ public class DamageItemFunction<CTX extends Context> extends AbstractConditional
} else if (item == null) {
return;
}
EquipmentSlot slot = hand == null ? null : hand == InteractionHand.MAIN_HAND ? EquipmentSlot.MAIN_HAND : EquipmentSlot.OFF_HAND;
EquipmentSlot slot = hand == null ? null : hand == InteractionHand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND;
item.hurtAndBreak(amount.getInt(ctx), player, slot);
}