22.214.171.124 Preview, 126.96.36.199 Beta, 1.16.221 Hotfix, 1.18.2 Hotfix, 1.18.31, 1.19.10, 1.19.40
- Place 5 floating solid blocks blocks in a row.
- Place 3 more solid blocks on top of the 5, leaving the ends of the bottom row uncovered.
- On top of the middle solid block you placed in step (2), place a coral or coral fan.
- Spawn a villager on one side of the row.
- Spawn a zombie on the other side of the row.
The zombie walks through the coral to reach the villager.
The zombie walks onto the coral but gets stuck there, jumping around. (There's a chance its jumping will move it far enough off the coral to resume pathfinding, whereupon it might eventually attack the villager.)
I've placed dead yellow coral fans in my barn for decoration, but it's causing mobs such as chickens to get stuck. Some mobs freeze in place, others will jump repeatedly in the same spot. It seems certain non-full blocks such as corals and carpets can ruin their pathfinding AI.