Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-249966

Warden can stop chasing a target it just roared at


    • Community Consensus
    • Mob behaviour
    • Normal

      I've noticed this a couple times in the previous snapshots, but it is so hard to replicate.
      I have figured out the cause of the issue and replicating it is quite easy.

      The bug:
      It might be intended that the Warden stops chasing a suspect if the anger value of that suspect goes below 80, but it creates very odd cases where the Warden can roar at a suspect and then stop chasing the suspect it just roared at. This happens when the anger value of a suspect just barely goes above 80 which is the threshold for making the Warden roar and chase a target.

      Steps to reproduce:

      • Create a wool area so that vibrations can't be detected by using the command below
        /fill ~-10 ~-1 ~-10 ~10 ~5 ~10 minecraft:white_wool hollow
      • Create a scoreboard with the commands below
        /scoreboard objectives add WardenAnger dummy
        /scoreboard objectives setdisplay sidebar WardenAnger
      • Inside of a repeating command block that is always active, enter this command.
        execute as @e[type=minecraft:warden,limit=1] at @s store result score AngerLevel WardenAnger run data get entity @s anger.suspects[0].anger
      • Create two separate fenced areas like seen in this screenshot
      • Summon a Warden in one of the fenced areas and zombie in the other
      • Observe the Wardens behavior and anger value

      Observed Results:
      The Warden can sometimes, very inconsistently, roar but not chase the player/mob

      • The suspects anger value can barely go over 80 (which is the threshold for the Warden to roar and start chasing a target), and then quickly go below 80 which causes the Warden to stop chasing the suspect it just got angry at.
      • All suspect data gets erased once a suspects anger value goes below 80 Fixed in 22w15a

      Expected Results:

      • The Warden will continue to chase the suspect it just got angry at for a normal period of time, and then proceed to roam once the anger value of the suspect goes below 80.
      • The Warden's suspect data will not be erased once the anger value of a suspect goes below 80. Fixed in 22w15a

      A possible solution
      A possible solution could be to set the anger value to it's maximum value once a suspects anger value goes above 80. (I believe this value is 150 because no matter how many times I hit the Warden it never goes above this value). This will cause the Warden to chase the suspect for a normal amount of time. Once the suspects anger value goes below 80, that suspect will no longer become the target and the Warden will start looking for more suspects.

            grum [Mojang] Grum (Erik Broes)
            Eometheous Eometheous
            9 Vote for this issue
            5 Start watching this issue