-
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:
- 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.)
- 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.)
- Die and do step 2. The attribute will no longer have the modifiers that was present previously.