mojira.dev
MC-306328

Using a Golden Dandelion to unlock aging forcibly removes persistence of baby animals

Using a Golden Dandelion on a baby animal that is age locked in order to remove the age lock will also remove its persistence, even if the animal should remain persistent due to other factors. (most notably, having a name tag applied to it)

This is caused by the method setAgeLocked in the AgeableMob class calling mob.setPersistenceRequired while only taking into account the age locking itself, and not other factors that should result in persistence.

Steps to reproduce:

  • Spawn, summon, or encounter a baby animal

  • Use the /data get entity command to verify that its AgeLocked value is 0b, and its PersistenceRequired value is also 0b

  • Use a named Name Tag item to apply a name to the mob

  • Use the /data get entity command to verify that its PersistenceRequired value has now become 1b, as expected, indicating the mob will no longer despawn

  • Use a Golden Dandelion item to lock the baby’s aging

  • Use the /data get entity command to verify that its AgeLocked value has now become 1b, as expected

  • Use a second Golden Dandelion item to unlock the baby’s aging

Expected Result:

  • Using the /data get entity command, you’ll see its AgeLocked value has returned to 0b as expected, and its PersistenceRequired value has remained 1b due to the baby having a name tag applied, preventing it from despawning

Actual Result:

  • Using the /data get entity command, you’ll see its AgeLocked value has returned to 0b as expected, however its PersistenceRequired value has also become 0b, meaning the baby can despawn again despite still having a name tag applied

Comments 1

when trying to run minecraft in the launcher nothing happens. when you then go and click launch again it says that the system is already running when it is in fact not running. i have tried everything. even reinstalling it.

shnupbups100

(Unassigned)

Unconfirmed

(Unassigned)

26.1 Snapshot 7

Retrieved