mojira.dev
MC-224454

Entities don't recognize azaleas or flowering azaleas as obstacles when pathfinding

The bug

Mobs can't jump onto the azalea bush and flowering azalea bush (mobs attempt to pathfind through the azalea bush).

Code analysis

Code analysis and potential fix can be found in this comment.

Related issues

MC-226607 Mobs can't pathfind over or around azalea bushes MC-229478 Azalea bushes (flowering and normal) aren't considered in mob path finding MC-230128 Mob can't pathfind ontop of azalea MC-230949 Villagers stuck on Azalea plant MC-231195 pathfinding MC-231750 villagers AI not recognizing some of new cave update blocks MC-232758 Villagers do not recognise the azalea bushes as path-finding blockers. MC-233116 Villager Pathing around azaleas MC-236134 Mobs do not jump on azalea when pathfinding MC-239145 Mobs Can't Jump the Azaleas MC-239313 Villagers are unable to pathfind through azalea MC-242611 There has been an error since 1.17 with hostile and pacifist mobs in general that do not have enough intelligence and cannot cross azalea saplings, they keep trying to cross it but do not surround or jump it MC-258711 Mobs Can't Path find over Azaleas MC-260521 Villagers don't seem to be able to pathfind around Azalea bushes (Flowering and non-flowering) MC-264306 Villagers get stuck behind azalea

Attachments

Comments

migrated
[media][media][media][media][media]
Avoma

Can confirm. Could be intentional.

Avoma

Video attached.

migrated

Can confirm.

migrated

It was quite amusing until a friend filled the village we live in with decorative azaleas. I have a feeling it's because maybe azaleas are grouped in with plants such as tall grass and flowers, mobs consider all these non-solid?

 

ampolive

Can confirm in 1.17.1 Release Candidate 1. Also relates to MC-181565.

migrated

This is related to an issue I have found and posted. Azaleas severely ruin AI pathfinding.

Orbic

Can still confirm for 1.18 Pre-1

migrated

I can confirm for 1.18. What I found interesting when I saw the bug is that the zombie did not jump on the nearby moss block either. I will put a screenshot of what I am talking about on this report.

lillybeacon

Added vanilla-parity due to recent Bedrock beta changes.

Orbic

In 22w05a, very noticeable in lush caves

Tanuki_Bakero

Confirmed with 22w11a

Tanuki_Bakero

Confirmed with 22w14a

Orbic

In 22w15a, this also effects the Warden too though with its ranged attack its slightly less of an issue

[media]
Tanuki_Bakero

Confirmed with 22w16b

Orbic

Still in 22w18a

Orbic

can confirm for 22w19a

Orbic

Still in 1.19 Pre-1

Orbic

In 1.19 Pre-2

Orbic

Still in 1.19 Pre-3

Orbic

In 1.19 Pre-4

Orbic

Effects 1.19 Pre-5

Tanuki_Bakero

Confirmed with 1.19.1 Release Candidate 1

Tanuki_Bakero

Confirmed with 1.19.1 Pre-release 4

Tanuki_Bakero

Confirmed with 1.19.1 Pre-release 5

Tanuki_Bakero

Confirmed with 1.19.1 Pre-release 6

Tanuki_Bakero

Confirmed with 1.19.1 Release Candidate 2

Tanuki_Bakero

Confirmed with 1.19.1

Tanuki_Bakero

Confirmed with 1.19.2

Tanuki_Bakero

Confirmed with 22w42a

Tanuki_Bakero

Confirmed with 22w43a

Tanuki_Bakero

Confirmed with 22w44a

ampolive

Code analysis (Mojang mappings, 1.19.2): This is somewhat tentative, but I believe this is what is happening: AzaleaBlock extends BushBlock; BushBlock#isPathfindable(...) calls BlockBehaviour#isPathfindable(...), which returns true (for the land and air path computation type) if it doesn't have a full block collision. Azalea blocks don't have a full block collision (they have a custom collision box), so it returns true. As such, mobs think they can pathfind through them.

The easiest fix would be to create an isPathfindable(...) method in AzaleaBlock that overrides it to always return false:

public boolean isPathfindable(BlockState $$0, BlockGetter $$1, BlockPos $$2, PathComputationType $$3) {
    return false;
}
Tanuki_Bakero

Confirmed with 1.19.3 Pre-release 2

Tanuki_Bakero

Confirmed with 1.19.3 Pre-release 3

Tanuki_Bakero

Confirmed with 1.19.3 Release Candidate 1

Tanuki_Bakero

Confirmed with 1.19.3 Release Candidate 3

migrated

Doesn't even need to be enclosed they can't pathfind around even 1 azalea bush. Uploaded screenshot.

migrated

Confirmed with 1.19.3

It confuse all types of AI, Villager, Golems, etc. not only hostile Mobs.

Tanuki_Bakero

Confirmed with 23w04a

Tanuki_Bakero

Confirmed with 23w05a

Avoma

Relates to MC-260196.

migrated

They also don't recognize Big Dripleafs as obstacles

migrated

Still a bug as of 1.20.4 and snapshot 24w13a

migrated

etanaratsastaja

Confirmed

Gameplay

Normal

Mob behaviour

azalea, flowering_azalea, vanilla-parity

21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, ..., 24w05b, 24w13a, 1.20.5 Release Candidate 2, 1.21, 1.21.1

24w33a

Retrieved