mojira.dev
MC-250114

Wardens are forced to roar at their suspect again when you change their data

I made a custom enchantment for a datapack that would change the mob's movement speed attribute to 0 and store it back later depending on what it was, and while I was testing this on the warden I found some interesting results. While the warden does keep the anger in nbt under anger.suspects, it sometimes also switches to a different target in the array if the movement attribute is set to 0. 

Observed Behavior:
The wardenloses interest or switches target, choosing from the anger.suspects array

Expected Behavior:
The warden will keep anger at the player until it is free to move again.

Demonstration:

Video 1

Video 2

Video 3

 

EDIT: Read comment for reproduction steps

Linked issues

Attachments

Comments 13

Please provide the datapack AND repro steps. Thank you.

Alright, I put this concept into one datapack so it's easier and lighter. 

 

I'm replying with quite a delay, but I know now what is the cause: It's actually using data modify on a warden while it has suspects of anger that causes this behavior to go crazy, not the fact that its attribute is changing. I know this because I messed around with some things and it is 100% the data modify command that causes this.

 

So proper title would be modifying the data of a warden causes it to lose agro temporarily and force a roar at the target again.

I will attach the datapack in to this report using attach files, and here are the repro steps:

How to reproduce:

 

1) Go in survival mode (I recommend giving yourself high resistance and have a repeating command block that clears darkness so this is easier)

2) Summon a warden 

3) Attack the warden

4) Watch as it forces itself to roar again after being mad at you.

 

 

In 1.19 pre release 1

In 1.19 pre release 2

3 more comments

this also occurs in 23w07a

this sadly still happens in the latest 1.19 pre 4 release

hey [~[Mojang] Moesh]

I added the steps and a pack as you asked, sorry this took a whole year to call back, but I figured this was still relevant since it is not fixed

Can confirm. Though, the datapack is not required and should not really be used to confirm this issue as it is far more verbose than what's required to reproduce this, and other functions could always interfere. Considering steps to reproduce were requested by Mojang, I would suggest adding this to the issue description.

Running this command when a warden is angry at the player will work just fine:

/data modify entity 1c338783-11ee-4873-b2ce-0032c5b18c80 anger set value 1000
[media]

Snap Doomy

(Unassigned)

Community Consensus

Platform

Normal

Commands, Mob behaviour

warden

22w14a, 22w18a, 22w19a, 1.19 Pre-release 1, 1.19 Pre-release 2, ..., 23w06a, 23w07a, 1.19.4 Pre-release 4, 1.19.4, 23w51b

Retrieved