Mojira Archive
MC-279731

Persistent/permanent attribute modifiers do not persist upon respawning

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.

Unresolved

eggohito

2025-01-23, 12:00 PM

2025-01-23, 12:15 PM

0

0

Unconfirmed

(Unassigned)

1.21.4

-