Mojira Archive
MC-17876

Entities' health is capped at their base max health upon reload

The bug

When I give myself extra max health with an attribute, then gain health, log out and log back in there are empty hearts but not the health.

Steps to Reproduce:

  • Give yourself a diamond sword that grants double health and hold it in your main hand.
  • /give @s diamond_sword[attribute_modifiers={modifiers:[{type:"generic.max_health",amount:20.0,slot:mainhand,id:"extra_max_hp_from_sword",operation:add_value}]}]
  • Give yourself some regeneration.
  • /effect give @s minecraft:regeneration 3 3 false
  • Take note of the health you currently have.
  • Reload into the world and once again, take note of the health that you now have.

Observed Behavior:
Additional health granted with items that have attributes is lost upon reloading the world.

Expected Behavior:
Additional health granted with items that have attributes would not be lost upon reloading the world.