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

Persistent/permanent attribute modifiers do not persist upon respawning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.4
    • None
    • Unconfirmed
    • (Unassigned)

      Attribute modifiers (added via the /attribute command) do not persist on players upon respawning (joining/leaving a world works fine.)

      I'm reporting this as the name of the method used in the /attribute command for adding attribute modifiers (EntityAttributeInstance#addPersistentModifier in Yarn, EntityAttributeInstance#addPermanentModifier in Mojmap) implies that the attribute modifiers will persist/permanent (which is only partially true.)

      This can be reproduced by doing the following:

      1. Execute /attribute @s minecraft:max_health modifier add testing 20 add_value to add a modifier to the 'minecraft:max_health' attribute (the attribute doesn't actually matter.)
      2. Execute /data get entity @s attributes[\{id: "minecraft:max_health"}].modifiers to display modifiers for the 'minecraft:max_health' attribute (there should be a single element in the list.)
      3. Die and do step 2. The attribute will no longer have the modifiers that was present previously.

            Unassigned Unassigned
            eggohito eggohito
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: