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

Wardens ignore PersistenceRequired and dig away

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 22w18a, 1.19 Pre-release 1
    • 1.19 Pre-release 2
    • None
    • Confirmed
    • Mob behaviour
    • Low

    Description

      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

        Issue Links

          Activity

            People

              grum [Mojang] Grum (Erik Broes)
              GoldSlimeling91 Robert Wyeth
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: