mojira.dev
MC-252157

'CustomName' NBT tag still prevents wardens from digging down

Warden AI has changed in 1.19 pre-release 2 so that they won't dig down when they have the PersistenceRequired flag to be consistent with other mobs. However this behavior is still controlled by the CustomName flag even if the warden has PersistenceRequired:0b set, which seems like an oversight from the fix of MC-251500.

This causes issues like wardens with custom names (summoned from commands) not behaving like naturally spawned ones even when they don't have PersistenceRequired (they'll never dig down).

Fixing this won't change any survival behavior as naming wardens with name tags already grants them PersistenceRequired like all other hostile mobs, making the CustomName check redundant.

How to reproduce

  1. Execute the following command:

    /summon warden ~ ~ ~ {CustomName:'{"text":"test"}',PersistenceRequired:0b,Brain:{memories:{"dig_cooldown":{value:{},ttl:1200L}}}}
  1. Wait for a minute.

  2. The warden won't dig down.

Comments 3

So, you're saying either field set will prevent digging? Or was MC-251500 not fixed?

The former. MC-251500 was indeed fixed.

Intended as per MC-250252.
Edit: Oh wait, I see what you mean. Naming the warden with a name tag will already grant it PersistenceRequired, so the check for the custom name is redundant.

syarumi

Erik Broes

Confirmed

(Unassigned)

1.19 Pre-release 2, 1.19 Pre-release 3, 1.19 Pre-release 4

1.19 Pre-release 5

Retrieved