[GH-ISSUE #3883] Camels cannot move for 52 ticks after every spawn; LastPoseTick is saved as a sign and freezes them on reload #1128

Closed
opened 2026-11-02 15:44:28 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ccclosed on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3883

Originally assigned to: @Benflex1 on GitHub.

🤖 Filed by ccclosed's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by ccclosed personally.

Severity: Medium — every camel spawn freezes for 2.6 s; a reload resets the pose
Snapshot: origin/main 7c1e0f979 (2026-10-30)

What happens

  1. Every spawned camel (and camel husk) cannot move for 52 ticks (2.6 s) and plays the stand-up animation. Mob::new starts at age = 0, and the spawn path calls stand_up_instantly which computes a relative egg_time = (age - 52 - 1).max(0) = 0; pose_time becomes 0, which the transition predicate treats as "just started standing up", so refuse_to_move is true and both AI and riding movement are zeroed.
    • crates/horizon-client/src/mobs/camel.rs:85 (stand_up_instantly), :40/:46/:69 (predicate), crates/horizon-client/src/mobs/spawning.rs:270 (Camel.finalizeSpawn), crates/horizon-client/src/mobs/equine.rs:562-566 (riders)
    • The parity-tested implementation already does it right in crates/horizon-client/src/mobs/finalize.rs:1726 (absolute pose_change_tick = game_time - 52 - 1).
  2. LastPoseTick is saved as a sign (0 standing / -1 sitting) instead of the pose-change time: crates/horizon-client/src/entity_nbt.rs:607-621 (write), :1257-1265 (read). A reload therefore resets every standing camel to pose_time = 0 (same 52-tick freeze) and a sitting camel to a fixed egg_time = -401; a vanilla save's real tick is reduced to its sign.

Repro

  • /summon minecraft:camel in a desert (or load a chunk with a natural camel), then ride it: it does not move for 2.6 s.
  • Save and reopen a standing camel: same freeze again; a camel that sat 5 ticks before saving behaves as if it had sat 401.
  • The audit's dynamic tests: freshly_spawned_camel_can_move, loaded_standing_camel_can_move, last_pose_tick_is_a_time_not_a_sign (the latter two fail).

Expected

Vanilla Camel.finalizeSpawn calls standUpInstantly() and the camel walks immediately; LastPoseTick stores DATA_POSE_CHANGE_TICK (a time, negative while sitting), and pose_time is now - |tick|.

Suggested fix

Keep one absolute pose_change_tick field (as finalize.rs and synced_pose_tick already do), derive sitting from its sign and pose_time from game_time - |tick|; save/read the real value in LastPoseTick.

Originally created by @ccclosed on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3883 Originally assigned to: @Benflex1 on GitHub. > 🤖 Filed by ccclosed's AI agent (DeepSeek Harness, deepseek-v4.1-flash), not by ccclosed personally. **Severity:** Medium — every camel spawn freezes for 2.6 s; a reload resets the pose **Snapshot:** `origin/main` `7c1e0f979` (2026-10-30) ### What happens 1. **Every spawned camel (and camel husk) cannot move for 52 ticks (2.6 s)** and plays the stand-up animation. `Mob::new` starts at `age = 0`, and the spawn path calls `stand_up_instantly` which computes a *relative* `egg_time = (age - 52 - 1).max(0) = 0`; `pose_time` becomes `0`, which the transition predicate treats as "just started standing up", so `refuse_to_move` is true and both AI and riding movement are zeroed. - `crates/horizon-client/src/mobs/camel.rs:85` (`stand_up_instantly`), `:40/:46/:69` (predicate), `crates/horizon-client/src/mobs/spawning.rs:270` (`Camel.finalizeSpawn`), `crates/horizon-client/src/mobs/equine.rs:562-566` (riders) - The parity-tested implementation already does it right in `crates/horizon-client/src/mobs/finalize.rs:1726` (absolute `pose_change_tick = game_time - 52 - 1`). 2. **`LastPoseTick` is saved as a sign** (`0` standing / `-1` sitting) instead of the pose-change time: `crates/horizon-client/src/entity_nbt.rs:607-621` (write), `:1257-1265` (read). A reload therefore resets every standing camel to `pose_time = 0` (same 52-tick freeze) and a sitting camel to a fixed `egg_time = -401`; a vanilla save's real tick is reduced to its sign. ### Repro - `/summon minecraft:camel` in a desert (or load a chunk with a natural camel), then ride it: it does not move for 2.6 s. - Save and reopen a standing camel: same freeze again; a camel that sat 5 ticks before saving behaves as if it had sat 401. - The audit's dynamic tests: `freshly_spawned_camel_can_move`, `loaded_standing_camel_can_move`, `last_pose_tick_is_a_time_not_a_sign` (the latter two fail). ### Expected Vanilla `Camel.finalizeSpawn` calls `standUpInstantly()` and the camel walks immediately; `LastPoseTick` stores `DATA_POSE_CHANGE_TICK` (a time, negative while sitting), and `pose_time` is `now - |tick|`. ### Suggested fix Keep one absolute `pose_change_tick` field (as `finalize.rs` and `synced_pose_tick` already do), derive `sitting` from its sign and `pose_time` from `game_time - |tick|`; save/read the real value in `LastPoseTick`.
Author
Owner

@Benflex1 commented on GitHub (Oct 29, 2026):

/claim

<!-- gh-comment-id:6510632581 --> @Benflex1 commented on GitHub (Oct 29, 2026): /claim
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#1128
No description provided.