mojira.dev
MC-144050

Aquatic mobs attempt to pathfind through and get stuck inside non-full waterlogged blocks

A pathfinding bug for fishes that occures in cases if the "fish entity" enters into a non full, waterlogged block (fences, iron bars).  This affects both solo fishes or individuals inside schools.

 

 

I think it's work like this: 

  • As the basic phatfinding AI leads the fish entity into a block it tries to lead it into the exact center of that block.

  • If that block is a full water block there is no broblem at all.

  • If the block is a waterlogged fence or iron bars, the fish can't get into the center, instead it's goes into some kind of "Im on my way there" state.

 If the entity once got into such waterlogged block, it will never tryes to move again. As soon as the player destroys the fence or iron bars, the fish immediately starts to move again freely.

My opinion is: The pathfinding fish entity is getting itself stuck in a never ending "i want to go there" loop if it can't enter into or pass trough the center of a water block. 

 

EDIT:

        This thing occures most of the times if the player goes away and returns to the area.. As I see most of the times it affects fishes that want to go beyond the actual waterloged block cause if the block is destroyed they immediately start to move at the direction they was facing.

   It's just a speculation, but I think to correctly develop the bug the player must go away from the fish (out of the fish AI proicessing range or even put the fish into a lazy cunk) once it's looks like it's stuck inside the waterlogged fence or iron bars block. When the player returns the fish AI somehow forgets to guide fishes wich are "stuck" in such blocks.

 

To reproduce this:

 - make a pool, and create some waterlogged fences, iron bars, stairs etc. inside it.

  • Put in some fish

  • Wait and see.

  • IF you see a fish got "stuck" in the waterloged block go away from it.

  • Return and the fish will not move itself ever again until you destroy the waterlogged block.

Linked issues

Attachments

Comments 11

I have never seen that for myself, but it actually sounds a bit funny

works fine for me

 

Can confirm in 20w51a, that this is still an issue.

Can confirm this works as of 1.17

For clarity I mean the bug still works (I could've phrased that better.)

1 more comments

Still a bug in 1.17.1, and it also affects turtles

This issue is the same as MC-241141 which covers all mobs affected by this issue but was created at a later date. Not too sure, but I believe one report should be resolved as a duplicate of the other for organization purposes.

Thanks, Avoma. I have resolved the other ticket as a duplicate.

This is still an issue all the way to 1.20.1, which is very disappointing. It causes dolphins to drown themselves and fish can end up beaching themselves on stairs.

Can confirm in 24w05a

Dynate

(Unassigned)

Confirmed

Mob behaviour

Minecraft 1.13.2, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, ..., 1.19.4, 23w14a, 1.20.1, 24w05a, 1.21

Retrieved