[PR #4074] [CLOSED] Fix camels freezing for 52 ticks after spawn and reload #5400

Closed
opened 2026-11-03 05:12:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4074
Author: @Benflex1
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: fix/3883-camel-pose-tick


📝 Commits (1)

  • 9b40698 Fix camels freezing for 52 ticks after spawn and reload

📊 Changes

12 files changed (+137 additions, -68 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+32 -11)
📝 crates/horizon-client/src/game/creatures.rs (+1 -1)
📝 crates/horizon-client/src/game/lan.rs (+1 -1)
📝 crates/horizon-client/src/game/natural_spawning.rs (+6 -1)
📝 crates/horizon-client/src/game/persist.rs (+6 -1)
📝 crates/horizon-client/src/game/raids.rs (+1 -1)
📝 crates/horizon-client/src/game/spawner.rs (+1 -1)
📝 crates/horizon-client/src/mobs/ai.rs (+1 -1)
📝 crates/horizon-client/src/mobs/camel.rs (+80 -40)
📝 crates/horizon-client/src/mobs/equine.rs (+5 -5)
📝 crates/horizon-client/src/mobs/finalize.rs (+1 -3)
📝 crates/horizon-client/src/mobs/spawning.rs (+2 -2)

📄 Description

Fixes #3883.

Camels kept the last pose change as a relative offset in the shared egg_time field, clamped to zero at spawn. A freshly spawned camel therefore had pose time 0, was treated as mid-transition, and refused to move for 52 ticks. LastPoseTick was also written as -1/0 instead of the real pose-change time, so a reload reset the pose.

This uses one absolute pose_change_tick in game time:

  • sitting is its sign, and pose_time is game_time - |tick|;
  • sit, stand and standUpInstantly write the real game time;
  • LastPoseTick saves and reads the real value;
  • game_time is threaded through the camel AI, ridden movement, dash and spawn-finalize paths.

Testing:

  • camel unit tests and the full horizon-client lib suite;
  • pr_ready.py --quick: rustfmt, clippy, 892 Rust tests, 475 Python tests;
  • finalize_spawn parity harness against 26.3: pass;
  • offscreen LAN ride check: host camel moved 11.86 blocks and guest camel 11.72 blocks in 3 s after summoning.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4074 **Author:** [@Benflex1](https://github.com/Benflex1) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3883-camel-pose-tick` --- ### 📝 Commits (1) - [`9b40698`](https://github.com/horizon-rust/horizon/commit/9b40698fa7a380f61c95f5fb6b9577a51e2f2849) Fix camels freezing for 52 ticks after spawn and reload ### 📊 Changes **12 files changed** (+137 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+32 -11) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -1) 📝 `crates/horizon-client/src/game/lan.rs` (+1 -1) 📝 `crates/horizon-client/src/game/natural_spawning.rs` (+6 -1) 📝 `crates/horizon-client/src/game/persist.rs` (+6 -1) 📝 `crates/horizon-client/src/game/raids.rs` (+1 -1) 📝 `crates/horizon-client/src/game/spawner.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/ai.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/camel.rs` (+80 -40) 📝 `crates/horizon-client/src/mobs/equine.rs` (+5 -5) 📝 `crates/horizon-client/src/mobs/finalize.rs` (+1 -3) 📝 `crates/horizon-client/src/mobs/spawning.rs` (+2 -2) </details> ### 📄 Description Fixes #3883. Camels kept the last pose change as a relative offset in the shared `egg_time` field, clamped to zero at spawn. A freshly spawned camel therefore had pose time 0, was treated as mid-transition, and refused to move for 52 ticks. `LastPoseTick` was also written as -1/0 instead of the real pose-change time, so a reload reset the pose. This uses one absolute `pose_change_tick` in game time: - `sitting` is its sign, and `pose_time` is `game_time - |tick|`; - sit, stand and `standUpInstantly` write the real game time; - `LastPoseTick` saves and reads the real value; - `game_time` is threaded through the camel AI, ridden movement, dash and spawn-finalize paths. Testing: - camel unit tests and the full `horizon-client` lib suite; - `pr_ready.py --quick`: rustfmt, clippy, 892 Rust tests, 475 Python tests; - `finalize_spawn` parity harness against 26.3: pass; - offscreen LAN ride check: host camel moved 11.86 blocks and guest camel 11.72 blocks in 3 s after summoning. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:20 +07:00
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#5400
No description provided.