From c89695dd93207ad855cd8e5ca07368ecbb17bd95 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Fri, 23 Oct 2026 22:01:32 +0200 Subject: [PATCH] lan_e2e hands: shoot the cow with a half drawn bow so it lives A fully drawn bow fires a crit arrow: AbstractArrow.onHitEntity adds random.nextInt(damage / 2 + 2) to the 6 damage, so one shot in five does 10 and kills the 10 health cow. The off hand bucket then had nothing to milk ("the host's off hand holds minecraft:bucket"), on either side, in any mode. Under 20 ticks of draw the arrow is no crit and does at most 6. The check now also asserts the cow is still there after the shot. Co-Authored-By: Claude Opus 5.5 --- tools/lan_e2e.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/lan_e2e.py b/tools/lan_e2e.py index 61ffe1f8e..73b93a159 100755 --- a/tools/lan_e2e.py +++ b/tools/lan_e2e.py @@ -3703,13 +3703,18 @@ def check_hands(host, guest, out): player.raw('select', 'minecraft:bow') aim_cow() assert player('looking_at')['kind'] == 'entity', f'the {label} does not aim at the cow' + # Half drawn: a full draw is a crit, up to 10 damage (AbstractArrow.onHitEntity), which + # kills the 10 health cow one shot in five. Under 20 ticks the arrow does at most 6. player.raw('mouse', 'right', 'down') - player.wait(25) + player.wait(10) drawn = player('state')['using'] player.raw('mouse', 'right', 'up') player.wait(20) assert drawn, f'the {label}\'s bow is not drawn at the cow' assert counts().get('minecraft:arrow') == 5, f'the {label} shot no arrow: {counts()}' + aim_cow() + cow = player('looking_at').get('entity') or {} + assert cow.get('health', 0) > 0, f'the {label}\'s arrow killed the cow: {cow}' player('command', command='clear @s') player('command', command='give @s minecraft:golden_apple') player.wait(5)