mojira.dev
MC-251500

Wardens ignore PersistenceRequired and dig away

The bug

Wardens were fixed to be unable to despawn when named, however, the tag given to named mobs is PersistenceRequired, and wardens do not operate under this tag and instead use CustomName to check if it can dig away or not. It should instead check PersistenceRequired.

Steps to Reproduce

  • Spawn a Warden in an area where it cannot be distracted.

  • Modify its data to include PersistenceRequired:1b.

  • Wait until it digs into the ground, ignoring the tag.

Code analysis

Warden#tick() resets the dig_cooldown if the warden has a custom name, rather than checking PersistenceRequired.

Attachments

Comments 4

I believe that this is a duplicate of MC-249393 which was later resolved as "Won't Fix".

Not quite the same issue. I believe this is a request for warden despawning to be based on the PersistenceRequired tag rather than the CustomName tag, which is very reasonable.

I see; thanks for this information. In that case, I can confirm this behavior as well. 🙂

GoldSlimeling91

Erik Broes

Confirmed

Low

Mob behaviour

22w18a, 1.19 Pre-release 1

1.19 Pre-release 2

Retrieved