diff --git a/bridge/lib/mineflayer/lib/bedrockPlugins/entities.mts b/bridge/lib/mineflayer/lib/bedrockPlugins/entities.mts index f97b38f..caf1960 100644 --- a/bridge/lib/mineflayer/lib/bedrockPlugins/entities.mts +++ b/bridge/lib/mineflayer/lib/bedrockPlugins/entities.mts @@ -504,7 +504,7 @@ export default function inject(bot: BedrockBot) { }); }); - function swingArm(arm = 'right', showHand = true, swingSource?: 'mine' | 'build') { + function swingArm(arm = 'right', showHand = true, swingSource?: 'mine' | 'build' | 'attack') { //const hand = arm === 'right' ? 0 : 1 const packet: any = { action_id: 'swing_arm', @@ -572,9 +572,9 @@ export default function inject(bot: BedrockBot) { const targetEyePos = target.position.offset(0, (target.height || 0) * 0.5, 0); await bot.lookAt(targetEyePos, true); } - // On Bedrock, swing arm first then send the attack transaction + // On Bedrock, swing arm with 'attack' source — server requires this to register damage if (swing) { - bot.swingArm(); + bot.swingArm('right', true, 'attack'); } attackEntity(target); }