Striders stand on lava instead of bobbing in it (#256)

Striders fell into the generic fallback AI, whose FloatGoal jumped them
up and down in lava. Port vanilla Strider: its goals (no FloatGoal,
StriderGoToLavaGoal, RandomStrollGoal every 60 ticks, LookAtPlayerGoal for
striders), floatStrider, standing on lava sources through the living
collision context and the half-block liquid shape, travelling in air where
lava holds it up, StriderPathNavigation's lava destinations, the walk target
value, going cold (suffocating speed modifier, cold texture) away from warm
blocks, the happy/retreat sounds and a lava-proof checkFallDamage.

Mobs now keep Entity.mainSupportingBlockPos from their last move, as
getBlockStateOnLegacy reads it.

Mob AI parity harness: five strider scenarios, 5/5 match (1105/1105
mob-ticks; 0/5 and 5/1105 before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-15 06:45:10 +02:00
parent e626a727a1
commit 8cd97334bf
9 changed files with 310 additions and 33 deletions
+10
View File
@@ -218,6 +218,16 @@ def scenarios():
f'mob minecraft:{species} 0.5 -60 0.5 0 {seed} persistent{baby}',
f'feed 20 0 minecraft:{food}', f'feed 40 0 minecraft:{food}',
])
# Striders: standing on a lava pool (floatStrider), walking from cold grass to it
# (StriderGoToLavaGoal, suffocating), and drawn by a player holding warped fungus.
LAVA = 'fill -5 -63 -5 5 -61 5 minecraft:lava'
add('strider_lava', 200, [LAVA, 'mob minecraft:strider 0.5 -61 0.5 0 131 persistent'])
add('strider_lava_player', 200, [LAVA, 'player 8.5 -60 0.5',
'mob minecraft:strider -1.5 -61 0.5 90 132 persistent'])
add('strider_shore', 300, [LAVA, 'mob minecraft:strider 9.5 -60 0.5 90 133 persistent'])
add('strider_cold', 200, ['mob minecraft:strider 0.5 -60 0.5 0 134 persistent'])
add('strider_tempted', 200, [LAVA, 'player 9.5 -60 0.5 hand=minecraft:warped_fungus',
'mob minecraft:strider 0.5 -61 0.5 0 135 persistent'])
return s