[PR #5327] [MERGED] A mannequin keeps and shows its description, and can be immovable #6211

Closed
opened 2026-11-03 06:15:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5327
Author: @xFedeT
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/mannequin-description-immovable


📝 Commits (3)

  • 0a02e78 A mannequin keeps and syncs its description and immovable flag
  • cf1e7d3 names: then_some
  • 34a3b73 Merge main into #5327 (main's perf_bench, triage-list and launcher-string failures, fixed by #5369 and #5397)

📊 Changes

6 files changed (+220 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+85 -6)
📝 crates/horizon-client/src/game/lan.rs (+21 -0)
📝 crates/horizon-client/src/game/names.rs (+37 -6)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+41 -0)
📝 crates/horizon-client/src/mobs.rs (+34 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+2 -1)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally.

Part of #3514: the Mannequin.updateDescription and Mannequin.defineSynchedData rows. The last comment on the issue says they wait for the synched-data indices and the description's format; both are in the vanilla source (Mannequin.java, Avatar.java, ClientMannequin.java).

Vanilla

  • Avatar defines DATA_PLAYER_MAIN_HAND (15) and DATA_PLAYER_MODE_CUSTOMISATION (16); Mannequin then defines DATA_PROFILE (17, already read), DATA_IMMOVABLE (18, boolean) and DATA_DESCRIPTION (19, optional component).
  • updateDescription() sets the description to Optional.empty() when hide_description is set, else the component; the default is entity.minecraft.mannequin.label. It saves description only when it is not the default, hide_description when hidden, and immovable always.
  • isEffectiveAi() is !immovable && super.isEffectiveAi(): an immovable mannequin never travels, so it hangs where it is.
  • ClientMannequin.belowNameDisplay() returns the description: it is the scoreText under the name, drawn within the below-name distance (10 blocks) whether or not the name shows.

What changes

  • Extra.immovable and Extra.description (MannequinDescription: default, hidden or a component), saved and loaded as above (entity_nbt.rs).
  • The server (lan.rs) now sends the mannequin's profile, DATA_IMMOVABLE and DATA_DESCRIPTION (a changed value only, as the other mobs); a client reads 18 and 19 (remote_mob_data.rs). Until now the server sent none of the mannequin's data.
  • An immovable mannequin skips travel (mobs/ai.rs).
  • The description is drawn under the name, or alone for a mannequin with no name (names.rs).

Verification

  • entity_nbt: a_mannequin_keeps_its_immovable_flag_and_description (default is not written, hide_description, a component, loaded back). remote_mob_data: a_mannequin_takes_its_immovable_flag_and_description.
  • A real run on the server thread (/summon minecraft:mannequin with the default description, with {description:{text:"Guard Captain",color:"gold"},immovable:1b} and with {hide_description:1b}): the left one shows the gold text, the middle one the default (PNG in the Italian lang file), the right one nothing.

mannequins: custom, default and hidden description

  • pr_ready --quick: rustfmt and clippy pass. The only failures are the 8 lan_bot tests and one test_perf_bench Python test, which fail the same way on a clean origin/main here.

🤖 Generated with Claude Code


🔄 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/5327 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mannequin-description-immovable` --- ### 📝 Commits (3) - [`0a02e78`](https://github.com/horizon-rust/horizon/commit/0a02e784e6fa1b0087854d56ca8f804cec47aa10) A mannequin keeps and syncs its description and immovable flag - [`cf1e7d3`](https://github.com/horizon-rust/horizon/commit/cf1e7d324647aa21372028b6bd86fd070b7c1f2b) names: then_some - [`34a3b73`](https://github.com/horizon-rust/horizon/commit/34a3b733cd68543ef9037c0daf2941c042473e91) Merge main into #5327 (main's perf_bench, triage-list and launcher-string failures, fixed by #5369 and #5397) ### 📊 Changes **6 files changed** (+220 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+85 -6) 📝 `crates/horizon-client/src/game/lan.rs` (+21 -0) 📝 `crates/horizon-client/src/game/names.rs` (+37 -6) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+41 -0) 📝 `crates/horizon-client/src/mobs.rs` (+34 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally. Part of #3514: the `Mannequin.updateDescription` and `Mannequin.defineSynchedData` rows. The last comment on the issue says they wait for the synched-data indices and the description's format; both are in the vanilla source (`Mannequin.java`, `Avatar.java`, `ClientMannequin.java`). ## Vanilla - `Avatar` defines `DATA_PLAYER_MAIN_HAND` (15) and `DATA_PLAYER_MODE_CUSTOMISATION` (16); `Mannequin` then defines `DATA_PROFILE` (17, already read), **`DATA_IMMOVABLE` (18, boolean)** and **`DATA_DESCRIPTION` (19, optional component)**. - `updateDescription()` sets the description to `Optional.empty()` when `hide_description` is set, else the component; the default is `entity.minecraft.mannequin.label`. It saves `description` only when it is not the default, `hide_description` when hidden, and `immovable` always. - `isEffectiveAi()` is `!immovable && super.isEffectiveAi()`: an immovable mannequin never travels, so it hangs where it is. - `ClientMannequin.belowNameDisplay()` returns the description: it is the `scoreText` under the name, drawn within the below-name distance (10 blocks) whether or not the name shows. ## What changes - `Extra.immovable` and `Extra.description` (`MannequinDescription`: default, hidden or a component), saved and loaded as above (`entity_nbt.rs`). - The server (`lan.rs`) now sends the mannequin's profile, `DATA_IMMOVABLE` and `DATA_DESCRIPTION` (a changed value only, as the other mobs); a client reads 18 and 19 (`remote_mob_data.rs`). Until now the server sent none of the mannequin's data. - An immovable mannequin skips `travel` (`mobs/ai.rs`). - The description is drawn under the name, or alone for a mannequin with no name (`names.rs`). ## Verification - `entity_nbt`: `a_mannequin_keeps_its_immovable_flag_and_description` (default is not written, `hide_description`, a component, loaded back). `remote_mob_data`: `a_mannequin_takes_its_immovable_flag_and_description`. - A real run on the server thread (`/summon minecraft:mannequin` with the default description, with `{description:{text:"Guard Captain",color:"gold"},immovable:1b}` and with `{hide_description:1b}`): the left one shows the gold text, the middle one the default (`PNG` in the Italian lang file), the right one nothing. ![mannequins: custom, default and hidden description](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/3514/mannequin-description.png) - `pr_ready --quick`: rustfmt and clippy pass. The only failures are the 8 `lan_bot` tests and one `test_perf_bench` Python test, which fail the same way on a clean `origin/main` here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:54 +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#6211
No description provided.