mojira.dev
MC-305722

Attribute Modifiers Are Not Preserved After Player Death

Attribute modifiers applied through the /attribute command are not preserved after the player dies. When a modifier is added to an attribute such as minecraft:max_health, it works correctly while the player is alive, but is completely removed upon death. After respawning, the attribute returns to its default value, as if the modifier had never been applied.

This behavior affects attribute modifiers added with commands like:
attribute @p minecraft:max_health modifier add <id> 20 add_value
Steps to Reproduce

  1. Run:
    attribute @p minecraft:max_health modifier add <id> 20 add_value

  2. Die (for example, using /kill @p)

  3. Respawn

  4. Run:
    attribute @p minecraft:max_health modifier get <id>

Attachments

Comments 3

MC-179940 states this as fixed in Snapshot 24w20a. Is this a potential regression?

MC-179940 covers the player’s base attributes, which are preserved upon death; that fix does not however extend to attribute modifiers.

Cree un mundo y por una seción se corrompió y se junto con otra semilla, osea yo le puse la semilla 3160785465770777471 y se junto con la semilla 0, no sé cómo arreglarlo y tampoco se como explicarlo mejor, si me contactan, les mandaré vídeo, gracias.

dogga

(Unassigned)

Unconfirmed

(Unassigned)

1.21.11, 26.1 Snapshot 3

Retrieved