[PR #2528] [MERGED] Server-thread clients animate warden, sniffer, breeze, camel and shulker (mob pose and entity events) #4398

Closed
opened 2026-11-03 04:16:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2528
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/server-mob-animation-sync


📝 Commits (7)

  • a45d0de Server-thread clients animate warden, sniffer, breeze, camel and shulker
  • 909f15b Count the warden tendril and heart animations down again
  • 6c769f3 Merge main into fix/server-mob-animation-sync
  • 62b8f33 Merge #2517 into fix/server-mob-animation-sync
  • c7c890d Merge #2526 into fix/server-mob-animation-sync
  • 2ce2190 Merge main into fix/server-mob-animation-sync
  • 4a82c01 Merge main into fix/server-mob-animation-sync

📊 Changes

12 files changed (+351 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+3 -0)
📝 crates/horizon-client/src/game/lan.rs (+62 -1)
📝 crates/horizon-client/src/game/remote.rs (+7 -0)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+26 -1)
📝 crates/horizon-client/src/mobs.rs (+9 -0)
📝 crates/horizon-client/src/mobs/breeze.rs (+22 -0)
📝 crates/horizon-client/src/mobs/camel.rs (+45 -4)
📝 crates/horizon-client/src/mobs/shulker.rs (+7 -0)
📝 crates/horizon-client/src/mobs/sniffer.rs (+22 -16)
➕ crates/horizon-client/src/mobs/sync.rs (+85 -0)
📝 crates/horizon-client/src/mobs/warden.rs (+58 -7)
📝 crates/horizon-client/src/mobs/warden_brain.rs (+5 -0)

📄 Description

What and why

A client of a server never saw the animation state these mobs compute on the server. That includes the window in single player, which joins its own server thread. A warden never emerged, roared, sniffed or swung. A sniffer never dug. A breeze never shot or slid. A camel never sat or dashed. A shulker stayed shut and was drawn upright on walls.

Now the server sends:

  • Entity.DATA_POSE (index 6) for every mob, from the fields the species keeps its pose in (warden, breeze, camel sitting). Other mobs send standing, which is the default.
  • Warden CLIENT_ANGER_LEVEL, sniffer DATA_STATE, shulker DATA_ATTACH_FACE_ID, DATA_PEEK_ID and DATA_COLOR_ID, camel DASH and LAST_POSE_CHANGE_TICK (in game time, negative while sitting).
  • Warden entity events 4 (attack), 61 (tendrils) and 62 (sonic boom) through a new MobEvent::EntityEvent.

The client reads them in remote_mob_data.rs and remote.rs, and runs the animation steps vanilla runs on the client in the new mobs/sync.rs (client_tick, entity_event, set_pose). The sniffer, breeze, camel and shulker steps are the server's own functions, split out so both sides share them. The warden's heartbeat sound stays with the server; the client only pulses the heart animation.

Part 2 will add the other species that never animate on a server client: ravager (events 4, 39), hoglin and zoglin (event 4), iron golem (event 4), creaking (events 4, 66), armadillo (event 64), vex charge, allay dance, axolotl, guardian eye and copper golem.

Vanilla reference

  • Warden.handleEntityEvent (4, 61, 62), Warden.onSyncedDataUpdated (pose), Warden.tick (heart, tendrils), CLIENT_ANGER_LEVEL.
  • Sniffer.onSyncedDataUpdated (DATA_STATE).
  • Breeze.onSyncedDataUpdated and Breeze.tick.
  • Camel.setupAnimationStates, getPoseTime, onSyncedDataUpdated (DASH), LAST_POSE_CHANGE_TICK.
  • Shulker.updatePeekAmount, DATA_ATTACH_FACE_ID, DATA_PEEK_ID, DATA_COLOR_ID.
  • Serializer ids and entry indices checked against EntityDataSerializers and the entity classes of 26.3.

Self-check

cargo check -p horizon-client passes.


🔄 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/2528 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-mob-animation-sync` --- ### 📝 Commits (7) - [`a45d0de`](https://github.com/horizon-rust/horizon/commit/a45d0de43eef252c6c0b45fad21e2e1bf70bf7bb) Server-thread clients animate warden, sniffer, breeze, camel and shulker - [`909f15b`](https://github.com/horizon-rust/horizon/commit/909f15b90979c4339575e4011c37f2d0588f3464) Count the warden tendril and heart animations down again - [`6c769f3`](https://github.com/horizon-rust/horizon/commit/6c769f38aeb6eeefbb29fee28d68e882d26e65c9) Merge main into fix/server-mob-animation-sync - [`62b8f33`](https://github.com/horizon-rust/horizon/commit/62b8f33671516c53f814e37dbf004a9203d48b0a) Merge #2517 into fix/server-mob-animation-sync - [`c7c890d`](https://github.com/horizon-rust/horizon/commit/c7c890dd69c6a1a20c3adc4d0d11df1a4f7dbcab) Merge #2526 into fix/server-mob-animation-sync - [`2ce2190`](https://github.com/horizon-rust/horizon/commit/2ce21900aef72a8bddf4b8e80a4fd6e597d29a70) Merge main into fix/server-mob-animation-sync - [`4a82c01`](https://github.com/horizon-rust/horizon/commit/4a82c014bb8a4ee8a2042a423e97062d69f0abcb) Merge main into fix/server-mob-animation-sync ### 📊 Changes **12 files changed** (+351 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+62 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+7 -0) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+26 -1) 📝 `crates/horizon-client/src/mobs.rs` (+9 -0) 📝 `crates/horizon-client/src/mobs/breeze.rs` (+22 -0) 📝 `crates/horizon-client/src/mobs/camel.rs` (+45 -4) 📝 `crates/horizon-client/src/mobs/shulker.rs` (+7 -0) 📝 `crates/horizon-client/src/mobs/sniffer.rs` (+22 -16) ➕ `crates/horizon-client/src/mobs/sync.rs` (+85 -0) 📝 `crates/horizon-client/src/mobs/warden.rs` (+58 -7) 📝 `crates/horizon-client/src/mobs/warden_brain.rs` (+5 -0) </details> ### 📄 Description ## What and why A client of a server never saw the animation state these mobs compute on the server. That includes the window in single player, which joins its own server thread. A warden never emerged, roared, sniffed or swung. A sniffer never dug. A breeze never shot or slid. A camel never sat or dashed. A shulker stayed shut and was drawn upright on walls. Now the server sends: - `Entity.DATA_POSE` (index 6) for every mob, from the fields the species keeps its pose in (warden, breeze, camel sitting). Other mobs send standing, which is the default. - Warden `CLIENT_ANGER_LEVEL`, sniffer `DATA_STATE`, shulker `DATA_ATTACH_FACE_ID`, `DATA_PEEK_ID` and `DATA_COLOR_ID`, camel `DASH` and `LAST_POSE_CHANGE_TICK` (in game time, negative while sitting). - Warden entity events 4 (attack), 61 (tendrils) and 62 (sonic boom) through a new `MobEvent::EntityEvent`. The client reads them in `remote_mob_data.rs` and `remote.rs`, and runs the animation steps vanilla runs on the client in the new `mobs/sync.rs` (`client_tick`, `entity_event`, `set_pose`). The sniffer, breeze, camel and shulker steps are the server's own functions, split out so both sides share them. The warden's heartbeat sound stays with the server; the client only pulses the heart animation. Part 2 will add the other species that never animate on a server client: ravager (events 4, 39), hoglin and zoglin (event 4), iron golem (event 4), creaking (events 4, 66), armadillo (event 64), vex charge, allay dance, axolotl, guardian eye and copper golem. ## Vanilla reference - `Warden.handleEntityEvent` (4, 61, 62), `Warden.onSyncedDataUpdated` (pose), `Warden.tick` (heart, tendrils), `CLIENT_ANGER_LEVEL`. - `Sniffer.onSyncedDataUpdated` (`DATA_STATE`). - `Breeze.onSyncedDataUpdated` and `Breeze.tick`. - `Camel.setupAnimationStates`, `getPoseTime`, `onSyncedDataUpdated` (`DASH`), `LAST_POSE_CHANGE_TICK`. - `Shulker.updatePeekAmount`, `DATA_ATTACH_FACE_ID`, `DATA_PEEK_ID`, `DATA_COLOR_ID`. - Serializer ids and entry indices checked against `EntityDataSerializers` and the entity classes of 26.3. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:52 +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#4398
No description provided.