[GH-ISSUE #1307] [singleplayer] Remaining absorption is lost when reopening a world #347

Closed
opened 2026-11-02 15:38:23 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @rdbtCVS on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1307

Tested commit: 83fa14e51b. Affects both --no-server-thread and --server-thread.

  1. In survival, run effect give @s absorption 120 1 (8 absorption points).
  2. Run damage @s 3 minecraft:generic; wait for damage immunity to expire. Five absorption points remain, health 20.
  3. Save, quit and reopen the world in the same mode.
  4. Run damage @s 6 minecraft:generic.

Expected: the five remaining points survive reopening, so health becomes 19.

Actual: health becomes 14 in both modes, although the absorption effect still has over 2,300 ticks remaining. A fresh control that saves without quitting ends at health 19 in both modes. This loses real protection, unlike the separate threaded HUD issue #1306.

Hypothesis: current absorption is neither written from the live body nor restored on login; AbsorptionAmount defaults to zero. Vanilla 26.3 LivingEntity explicitly saves and restores that amount.

Acceptance: reopening preserves the current, partially depleted amount; the reproduction ends at health 19 without refilling absorption.

Evidence: tools/singleplayer_gaps_audit.py --case absorption-reopen --case absorption-continuous; paired traces/saves in .local/singleplayer-audit/gaps-{a,b}/, report docs/audits/singleplayer-gaps-2026-10-22.md. Identical builds with read-only diagnostics. No matching persistence issue found.

Originally created by @rdbtCVS on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1307 Tested commit: 83fa14e51b89eab728b8e233e9e5d95296bef93d. Affects both `--no-server-thread` and `--server-thread`. 1. In survival, run `effect give @s absorption 120 1` (8 absorption points). 2. Run `damage @s 3 minecraft:generic`; wait for damage immunity to expire. Five absorption points remain, health 20. 3. Save, quit and reopen the world in the same mode. 4. Run `damage @s 6 minecraft:generic`. Expected: the five remaining points survive reopening, so health becomes 19. Actual: health becomes 14 in both modes, although the absorption effect still has over 2,300 ticks remaining. A fresh control that saves without quitting ends at health 19 in both modes. This loses real protection, unlike the separate threaded HUD issue #1306. Hypothesis: current absorption is neither written from the live body nor restored on login; `AbsorptionAmount` defaults to zero. Vanilla 26.3 `LivingEntity` explicitly saves and restores that amount. Acceptance: reopening preserves the current, partially depleted amount; the reproduction ends at health 19 without refilling absorption. Evidence: `tools/singleplayer_gaps_audit.py --case absorption-reopen --case absorption-continuous`; paired traces/saves in `.local/singleplayer-audit/gaps-{a,b}/`, report `docs/audits/singleplayer-gaps-2026-10-22.md`. Identical builds with read-only diagnostics. No matching persistence issue found.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#347
No description provided.