[GH-ISSUE #1483] [both singleplayer modes] Summoned cows ignore supplied attribute values #453

Closed
opened 2026-11-02 15:39:11 +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/1483

Tested 33e35d37c0362a0580e4927bfc12d0b15a3dc5a7 with explicit --no-server-thread and --server-thread.

Reproduce:

/summon cow ~ ~ ~ {NoAI:1b,attributes:[{id:"minecraft:max_health",base:40.0d}]}
/attribute @e[type=cow,sort=nearest,limit=1] minecraft:max_health base get

Expected: 40.0, as in native 26.3.
Actual in both modes: 10.0, the default cow maximum.

A direct /attribute ... base set 40 works. In a second control, the same summon NBT correctly gives a horse 40 maximum health. Supplied cow movement speed 0 is also ignored, returning about 0.2; the horse and direct-command controls return 0.

Evidence: paired current-mob-attributes-{a,b} worlds under .local/singleplayer-audit/; b reduces to just the one maximum-health attribute above. Native native-mob-attributes-reference/check.log returns the requested 0 speed/40 health for both animals.

Hypothesis: entity_nbt reads these attribute bases only in the equine branch, leaving other mobs at type defaults.

Acceptance: the supplied cow maximum-health and movement-speed bases take effect on spawn, matching the native, horse and direct-command controls.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1483 Tested `33e35d37c0362a0580e4927bfc12d0b15a3dc5a7` with explicit `--no-server-thread` and `--server-thread`. Reproduce: ``` /summon cow ~ ~ ~ {NoAI:1b,attributes:[{id:"minecraft:max_health",base:40.0d}]} /attribute @e[type=cow,sort=nearest,limit=1] minecraft:max_health base get ``` Expected: 40.0, as in native 26.3. Actual in both modes: 10.0, the default cow maximum. A direct `/attribute ... base set 40` works. In a second control, the same summon NBT correctly gives a horse 40 maximum health. Supplied cow movement speed 0 is also ignored, returning about 0.2; the horse and direct-command controls return 0. Evidence: paired `current-mob-attributes-{a,b}` worlds under `.local/singleplayer-audit/`; b reduces to just the one maximum-health attribute above. Native `native-mob-attributes-reference/check.log` returns the requested 0 speed/40 health for both animals. Hypothesis: `entity_nbt` reads these attribute bases only in the equine branch, leaving other mobs at type defaults. Acceptance: the supplied cow maximum-health and movement-speed bases take effect on spawn, matching the native, horse and direct-command controls.
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#453
No description provided.