mojira.dev
MCPE-45645

Drowneds and fish swimming around in circles

All repros below use [mediaInline]

Repro 1: fish get stuck directly above non-solid blocks

  1. Make a 5x5x5 source water chamber with a stone floor.

  2. Replace the center stone block with a non-solid-material block (sea lantern, glass, leaves, ice, etc.).
    Spawn a cod on the center block.

Expected result
The fish swims around.

Observed result
The fish does not move.

[media]

Repro 2: fish stop and spin in place when moving across non-solid blocks

  1. Make a 5x5x5 source water chamber with a stone floor.

  2. Replace the center stone block with a non-solid-material block (sea lantern, glass, leaves, ice, etc.).

  3. Spawn a cod on one of the 8 stone blocks adjacent to the center block.

  4. If the cod starts moving toward any space other than the spot above the center block, kill it an spawn a new one. The bug can only been seen if it tries to swim across the space directly above the non-solid block.

Expected result
The fish swims across the non-solid block and keeps going.

Observed result
The fish stops and spins in place above the non-solid block.

[media]

Repro 3: fish get stuck when moving across non-full-height blocks in 1 block deep water

  1. Make a 5x1x5 source water chamber with a stone floor.

  2. Replace the center stone block with a non-full block (lower slab, mud).

  3. Spawn a cod on the center block.

Expected result
The fish swims around.

Observed result
The fish begins to swim but stops at the edge of the block.

[media]

Repro 4: fish stop and spin when moving upwards in water 2 blocks deep above mud (MCPE-162241)

  1. Make a 5x2x5 source water chamber with a mud floor.

  2. Spawn a cod on the center floor block.

Expected result
The fish swims around freely.

Observed result
When the fish tries to ascend from the first layer of water above the mud to the second layer of water, it stops and spins in place.

[media]

Repro 5: drowned stop and spin when swimming upwards over sloped terrain towards a targeted entity

  1. Make a large water chamber with an inclined floor in the middle.

  2. Place blocks a line of blocks sideways across the chamber so that they leave 3-block high water above the inclined floor.

  3. Spawn an iron golem on the upper side of the incline chamber. Restrain it so that it cannot move.

  4. Spawn a drowned on the lower side of the chamber.

  5. If the drowned reaches the golem, kill it and spawn a new one.

Expected result
The drowned moves to the iron golem and attacks it.

Observed result
The drowned sometimes gets stuck spinning when it tries to ascend the incline toward the golem.

[media]

I was playing on my bedrock addition, and I came across two drowned. Having nothing better to do I jumped into the water to gain their attention and started hitting them with a stick (the only thing I had on me) and they started glitching. One was spinning around while the other was pushing it into the dirt. Both while trying to attack me. 

Linked issues

BDS-8245 Sea life mob pathing is broken Resolved BDS-15314 Fish spinning Resolved MCPE-45922 Tropical Fish get stuck on stairs Resolved MCPE-58605 Named tropical fish from 1.13 now doing endlessly on the floor of the aquarium. Resolved MCPE-60210 Fish get stuck spinning on sea lamps Resolved

Attachments

Comments 19

Euwill Eusebio

Did you have this bug occur multiple times? Or just this once?

I can confirm this in the latest 1.14.30 on the windows 10 uwp version and iOS, going to upload a video from both.

This bug seems similar to the issue in Java edition, MC-104631

GoldenHelmet has noted an amplification in this and similar bugs in MCPE-45922 MCPE-60210 MCPE-58605 MCPE-60497

[Mod] Umija5895M

Reportedly happens for other aquatic mobs also.

9 more comments

I want to add that this happens with all mobs/monsters whether they're vanilla or custom made ones.

Still happens in Bedrock 1.9.5 on xbox. Axolotls also exhibit this behavior.  Can’t use sea lamps to light up water as all fish just start spinning

I'm having this same issue with Tropical Fish spinning on Mud Blocks with Kelp on them. Removing the Kelp didn't seem to make the Tropical Fish stop spinning.

May also be happening to Tropical Fish on Mud Blocks without Kelp.

[media]

This bug has the same cause as MCPE-37229, MCPE-131091, and MCPE-162241: when mobs swim, the position that they target for movement is offset in the -Y direction from the path that they have pre-generated. In other words, after they find a path through water they try to move a block below that path. The exact offset is difficult to determine; I think it is between 0.25 and 1.25 blocks.

This offset causes swimming mobs to stop moving and/or spin when the block below them is made of non-solid material and all of the 8 blocks around that block horizontally are made of solid-blocking material. The mob then "thinks" it cannot move horizontally. (Non-solid material blocks include things like sea lanterns, glass, leaves, mangrove roots, and even water itself; solid material blocks include anything made of dirt, iron, wood, stone, etc.)

[media]

In light of this analysis, I do not know why swimmers are able to move when all of the blocks below them are solid. I guess that there is some nuance to block checks during pathfinding that partially overcomes this bug. However, they are not above to navigate through one-block-high water that goes up over a block. They always try to swim into the block below the water in that case.

[media]

Spinning above mud floors (MCPE-162241) has the same root cause (swim Y offset) but the behavior is slightly different because mud is a solid block so the stopping/spinning relates somehow to the mud collision box.

[media]

[media]

contains the test chamber shown in the videos above, and several other test setups that can be used to investigate this bug.

With the use of mud blocks, still a present issue in tropical fish, cod, salmon, turtles, and puffer fish in 1.21 bedrock on realms.

Hannah Anne Linkswiler

(Unassigned)

261322

Confirmed

Multiple

Kindle fire 7

drowned, fish, swimming

1.21.62 Hotfix, 1.18.10.24 Beta, 1.17.40.20 Beta, 1.17.11 Hotfix, 1.16.210.59 Beta, ..., 1.19.22 Hotfix, 1.19.51, 1.20.10, 1.20.41 Hotfix, 1.20.80

Retrieved