[PR #2401] [MERGED] Apply an armor stand's saved pose #4280

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

📋 Pull Request Information

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

Base: main ← Head: fix/armor-stand-pose


📝 Commits (4)

  • 63ee634 Apply an armor stand's saved pose
  • daee960 Send an armor stand's default pose when it is reset
  • 588b2fd Merge main into fix/armor-stand-pose
  • 9dd2766 Merge main into fix/armor-stand-pose

📊 Changes

5 files changed (+103 additions, -53 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+16 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+22 -0)
📝 crates/horizon-client/src/game/armor_stands.rs (+32 -16)
📝 crates/horizon-client/src/game/lan_entities.rs (+29 -37)
📝 crates/horizon-client/src/game/remote_objects.rs (+4 -0)

📄 Description

What and why

Armor stands from commands, structures and saves with a Pose always stood in the default pose. The tag was kept in the raw data but never read, and the renderer hard-coded the default arm and leg angles. Head and body rotations were not applied at all.

Now the stand holds its six rotations (head, body, left arm, right arm, left leg, right leg), which are:

  • read from Pose on load and written back (only the parts that are not default, like vanilla's codec),
  • drawn on the stand's model, with the body rotation also turning the body sticks, and on the armor layers, so a posed head wears its helmet at the same angle,
  • sent to clients on the server thread from the stand's own values (the old code read them from the raw save data), and applied by the client when it receives them.

The one existing test of the pose data now builds the stand from its fields instead of a compound, since that is where the poses come from now.

Vanilla reference

  • ArmorStand.DEFAULT_*_POSE, DATA_*_POSE, ArmorStandPose.CODEC (Pose tag)
  • ArmorStandModel.setupAnim and ArmorStandArmorModel.setupAnim
  • ArmorStandRenderer.extractRenderState

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/2401 **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/armor-stand-pose` --- ### 📝 Commits (4) - [`63ee634`](https://github.com/horizon-rust/horizon/commit/63ee634ee03b27b6372b0907857b91a79f90bbb3) Apply an armor stand's saved pose - [`daee960`](https://github.com/horizon-rust/horizon/commit/daee960ba2ee0f868e26b02e7e5ce0ab468a6f5a) Send an armor stand's default pose when it is reset - [`588b2fd`](https://github.com/horizon-rust/horizon/commit/588b2fd11689f3553d2ef21558180e4f33ddf09f) Merge main into fix/armor-stand-pose - [`9dd2766`](https://github.com/horizon-rust/horizon/commit/9dd27667f2ad8bccddd87d30ad89f9f4495b058d) Merge main into fix/armor-stand-pose ### 📊 Changes **5 files changed** (+103 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+16 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+22 -0) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+32 -16) 📝 `crates/horizon-client/src/game/lan_entities.rs` (+29 -37) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+4 -0) </details> ### 📄 Description ## What and why Armor stands from commands, structures and saves with a `Pose` always stood in the default pose. The tag was kept in the raw data but never read, and the renderer hard-coded the default arm and leg angles. Head and body rotations were not applied at all. Now the stand holds its six rotations (head, body, left arm, right arm, left leg, right leg), which are: - read from `Pose` on load and written back (only the parts that are not default, like vanilla's codec), - drawn on the stand's model, with the body rotation also turning the body sticks, and on the armor layers, so a posed head wears its helmet at the same angle, - sent to clients on the server thread from the stand's own values (the old code read them from the raw save data), and applied by the client when it receives them. The one existing test of the pose data now builds the stand from its fields instead of a compound, since that is where the poses come from now. ## Vanilla reference - `ArmorStand.DEFAULT_*_POSE`, `DATA_*_POSE`, `ArmorStandPose.CODEC` (`Pose` tag) - `ArmorStandModel.setupAnim` and `ArmorStandArmorModel.setupAnim` - `ArmorStandRenderer.extractRenderState` ## 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:02 +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#4280
No description provided.