From 8a04e18b9167d39bdd2dbb08575bf82dc3f68d25 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:23:40 +0200 Subject: [PATCH] Measure the minecart push with the player standing half in it Walking through the cart pushes it back once past its middle, so the check stands the player half into the cart from the north and waits. Co-Authored-By: Claude Opus 5.5 --- tools/lan_e2e.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/lan_e2e.py b/tools/lan_e2e.py index d2b9af145..42dd7ec53 100755 --- a/tools/lan_e2e.py +++ b/tools/lan_e2e.py @@ -5303,7 +5303,8 @@ def check_vehicles(host, guest, out): - land on a boat on the ground and stand on it (AbstractBoat.canBeCollidedWith); - sit in a boat that lava reaches: lavaHurt twice a tick breaks it at once, and the rider is out; - see a minecart in lava break, and a TNT minecart in lava prime and go off; - - walk into a minecart off rails and push it (AbstractMinecart.push from the server's player).""" + - stand half in a minecart off rails and push it away (AbstractMinecart.push from the server's + player).""" result = {} spots = apart(host, guest) for label, player in (('host', host), ('guest', guest)): @@ -5354,15 +5355,13 @@ def check_vehicles(host, guest, out): player('command', command=f'fill {x - 3} {y} {z - 3} {x + 4} {y + 3} {z + 6} minecraft:air') player('command', command=f'fill {x - 3} {y - 1} {z - 3} {x + 4} {y - 1} {z + 6} minecraft:stone') player('command', command='gamemode survival') - player('command', command=f'tp @s {x + 0.5} {y} {z + 0.5} 0 0') cart_at = (x + 0.5, y, z + 1.6) player('command', command=f'summon minecraft:minecart {cart_at[0]} {y} {cart_at[2]}') player.wait(10) before = near('minecart', cart_at)[0]['position'] - player.raw('key', 'w', 'down') - player.wait(15) - player.raw('key', 'w', 'up') - player.wait(10) + # Half into the cart from the north: it is pushed south until they are apart. + player('command', command=f'tp @s {x + 0.5} {y} {before[2] - 0.4:.2f} 0 0') + player.wait(20) after = near('minecart', cart_at)[0]['position'] seen['cart_pushed'] = round(after[2] - before[2], 3) player.shot(out, f'vehicles-{label}') @@ -5383,7 +5382,7 @@ def check_vehicles(host, guest, out): assert seen['rider'] == {'riding': None, 'boats': 0}, f'{label}: lava left the boat or its rider: {seen}' assert seen['minecart_in_lava'] == 0, f'{label}: a minecart outlived lava: {seen}' assert seen['tnt_minecart'] == {'left': 0, 'booms': 1}, f'{label}: the TNT minecart in lava: {seen}' - assert seen['cart_pushed'] > 0.1, f'{label}: walking into the minecart left it: {seen}' + assert seen['cart_pushed'] > 0.1, f'{label}: the minecart stayed in the player: {seen}' return result