[GH-ISSUE #1404] Threaded singleplayer keeps the default heart capacity after max-health changes #427

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

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

Tested 83fa14e51b89eab728b8e233e9e5d95296bef93d, explicitly comparing --server-thread and --no-server-thread in disposable worlds.

Reproduce in Survival:

  1. Run /attribute @s minecraft:max_health base set 40.
  2. Wait, then run /effect give @s instant_health 1 10 and wait again.
  3. Compare the hearts with /data get entity @s Health.

Expected: 40 health, displayed as 20 full hearts, as in old singleplayer.
Actual with --server-thread: server reports 40 health but the client reports 20 and draws only ten hearts. Setting the maximum to 10 also leaves ten heart slots instead of five. The server applies the attribute and healing correctly.

Repeated in explosion-{b,c}/max-health-*; c has clean HUD screenshots. Evidence: .local/singleplayer-audit/, driver tools/singleplayer_explosion_audit.py. Each change had 10 ticks before healing and another 20 before observation.

Hypothesis: the remote client ignores UpdateAttributes; apply_remote_health clamps the incoming value through the unchanged local maximum.

Acceptance: increasing and decreasing maximum health updates the HUD capacity and permits the received current health after processing completes.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1404 Tested `83fa14e51b89eab728b8e233e9e5d95296bef93d`, explicitly comparing `--server-thread` and `--no-server-thread` in disposable worlds. Reproduce in Survival: 1. Run `/attribute @s minecraft:max_health base set 40`. 2. Wait, then run `/effect give @s instant_health 1 10` and wait again. 3. Compare the hearts with `/data get entity @s Health`. Expected: 40 health, displayed as 20 full hearts, as in old singleplayer. Actual with `--server-thread`: server reports 40 health but the client reports 20 and draws only ten hearts. Setting the maximum to 10 also leaves ten heart slots instead of five. The server applies the attribute and healing correctly. Repeated in `explosion-{b,c}/max-health-*`; c has clean HUD screenshots. Evidence: `.local/singleplayer-audit/`, driver `tools/singleplayer_explosion_audit.py`. Each change had 10 ticks before healing and another 20 before observation. Hypothesis: the remote client ignores `UpdateAttributes`; `apply_remote_health` clamps the incoming value through the unchanged local maximum. Acceptance: increasing and decreasing maximum health updates the HUD capacity and permits the received current health after processing completes.
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#427
No description provided.