A piglin holding a spear charges its target once. When the charge ends and there is no valid 9–11 block retreat position around the target (for example, on a small floating platform surrounded by air), the piglin remains stuck in the spear AI's RETREAT state. It keeps following the target but never charges or melee-attacks again. Moving the same piglin and target to open ground makes it recover.
Steps to Reproduce:
In a vanilla 26.3 world, build a 9×9 floating stone platform at y=99 with no ground within 11 blocks:
/tp @s 0 100 3 /fill -4 99 -4 4 99 4 minecraft:stone /summon piglin 2 100 0 {equipment:{mainhand:{id:"minecraft:golden_spear",count:1}},IsImmuneToZombification:true} /gamemode survivalWait for the piglin to charge.
Observe for 30+ seconds.
Expected Result:
After the charge, the piglin should retreat and continue attacking, or at least not get permanently stuck.
Observed Result:
The piglin keeps walking toward the target but never charges again.
Comments 0
No comments.