The bug
If you obtain the absorption effect, and then exit and re-enter a singleplayer world, the absorption effect disappears. All of your gold hearts are lost even though you still had time left on the timer. This did not happen in 1.20.1.
To reproduce
Eat a golden apple.
Observe that you now have gold hearts.
Verify that you have the effect by running the below command. You will see some NBT for the effect:
23w31a
/data get entity @s ActiveEffects[{Id:22}]
23w32a+
/data get entity @s active_effects[{id:"minecraft:absorption"}]
Verify that you have absorption health by running the below command. You will see a non-zero number:
/data get entity @s AbsorptionAmount
Pause the game. Click "Save and Quit to Title".
Re-open the world.
Observe that your gold hearts are missing. ❌
Verify that the effect is gone by running the below command. You will see red text:
23w31a
/data get entity @s ActiveEffects[{Id:22}]
Result: "Found no elements matching ActiveEffects[{Id:22}]"
23w32a+
/data get entity @s active_effects[{id:"minecraft:absorption"}]
Result: "Found no elements matching active_effects"
Verify that your absorption health is gone by running the below command. You will see the number zero:
/data get entity @s AbsorptionAmount
Expected behavior
The absorption effect is retained when the world is closed and re-opened.
Observed behavior
The absorption effect is lost.
Linked issues
Attachments
Comments 2
The absorption effect is retained when going through a nether portal or the stronghold portal to the end. (All effects are lost when going through the end exit portal due to MC-6431.)
I have not tested this in multiplayer.