[PR #2394] [MERGED] Let a tame parrot sit on its owner's shoulder #4273

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

📋 Pull Request Information

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

Base: main ← Head: fix/parrot-shoulder


📝 Commits (5)

  • b5a735c Let tame parrots follow their owner and sit when told to
  • 9ca7162 Let a tame parrot sit on its owner's shoulder
  • be714b3 Only let a tame parrot land on its saved owner
  • 32c8def Merge main into fix/parrot-shoulder
  • 505d17a Merge main into fix/parrot-shoulder

📊 Changes

10 files changed (+227 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+11 -0)
📝 crates/horizon-client/src/game.rs (+2 -0)
📝 crates/horizon-client/src/game/creatures.rs (+18 -0)
📝 crates/horizon-client/src/game/lan.rs (+7 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+4 -0)
📝 crates/horizon-client/src/game/lan_mobs.rs (+1 -0)
➕ crates/horizon-client/src/game/shoulders.rs (+124 -0)
📝 crates/horizon-client/src/mobs.rs (+5 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+1 -0)
📝 crates/horizon-client/src/mobs/tame.rs (+54 -0)

📄 Description

Builds on #2382 (tame parrots follow and sit); the first commit here is that PR and the diff shrinks once it is merged.

What and why

A tame parrot never landed on its owner's shoulder. Now it does: when a tame, standing parrot older than 100 ticks touches its owner, it is saved as the player's ShoulderEntityLeft or ShoulderEntityRight (the first free one) and taken out of the world, as vanilla does. It comes back at the player (0.7 above their feet, still owned by them) when the player falls more than half a block, swims, flies, sleeps, is in powder snow, is hurt, dies, becomes a spectator or spins with a riptide. A parrot that just landed stays for at least 20 ticks.

The shoulder data lives in the player's own save data (ShoulderEntityLeft/Right), which Horizon already keeps, so it survives saving and loading. For a guest or the integrated-server player their saved data is now swapped in with the rest of their state while their action runs, and the landing is run as that player.

Not covered here: drawing the parrot on the player's shoulder, the matching synched data for other players (DATA_SHOULDER_PARROT_LEFT/RIGHT), and the shoulder parrot's ambient sounds. These need the player renderer and are left for follow-ups.

Vanilla reference

  • LandOnOwnersShoulderGoal.canUse/tick, ShoulderRidingEntity.setEntityOnShoulder/canSitOnShoulder (cooldown 100).
  • ServerPlayer.setEntityOnShoulder, handleShoulderEntities, removeEntitiesOnShoulder (timeEntitySatOnShoulder + 20), respawnEntityOnShoulder.
  • Triggers: ServerPlayer.hurtServer/die/setGameMode, Player.startAutoSpinAttack.

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/2394 **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/parrot-shoulder` --- ### 📝 Commits (5) - [`b5a735c`](https://github.com/horizon-rust/horizon/commit/b5a735c8d176f0ea15535c450bf4d548c1d69ffe) Let tame parrots follow their owner and sit when told to - [`9ca7162`](https://github.com/horizon-rust/horizon/commit/9ca7162169b8db523223534eaa4874ea937e1be8) Let a tame parrot sit on its owner's shoulder - [`be714b3`](https://github.com/horizon-rust/horizon/commit/be714b38bbc3e27aa2d5aa1b3f0244b490c7d16b) Only let a tame parrot land on its saved owner - [`32c8def`](https://github.com/horizon-rust/horizon/commit/32c8def11499076b47ce9b35c4dba0d73c2fdfbe) Merge main into fix/parrot-shoulder - [`505d17a`](https://github.com/horizon-rust/horizon/commit/505d17a42541d6fca745e4d38d90e0246b40b634) Merge main into fix/parrot-shoulder ### 📊 Changes **10 files changed** (+227 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+11 -0) 📝 `crates/horizon-client/src/game.rs` (+2 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+18 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+7 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+4 -0) 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+1 -0) ➕ `crates/horizon-client/src/game/shoulders.rs` (+124 -0) 📝 `crates/horizon-client/src/mobs.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/tame.rs` (+54 -0) </details> ### 📄 Description Builds on #2382 (tame parrots follow and sit); the first commit here is that PR and the diff shrinks once it is merged. ## What and why A tame parrot never landed on its owner's shoulder. Now it does: when a tame, standing parrot older than 100 ticks touches its owner, it is saved as the player's `ShoulderEntityLeft` or `ShoulderEntityRight` (the first free one) and taken out of the world, as vanilla does. It comes back at the player (0.7 above their feet, still owned by them) when the player falls more than half a block, swims, flies, sleeps, is in powder snow, is hurt, dies, becomes a spectator or spins with a riptide. A parrot that just landed stays for at least 20 ticks. The shoulder data lives in the player's own save data (`ShoulderEntityLeft/Right`), which Horizon already keeps, so it survives saving and loading. For a guest or the integrated-server player their saved data is now swapped in with the rest of their state while their action runs, and the landing is run as that player. Not covered here: drawing the parrot on the player's shoulder, the matching synched data for other players (`DATA_SHOULDER_PARROT_LEFT/RIGHT`), and the shoulder parrot's ambient sounds. These need the player renderer and are left for follow-ups. ## Vanilla reference - `LandOnOwnersShoulderGoal.canUse/tick`, `ShoulderRidingEntity.setEntityOnShoulder/canSitOnShoulder` (cooldown 100). - `ServerPlayer.setEntityOnShoulder`, `handleShoulderEntities`, `removeEntitiesOnShoulder` (`timeEntitySatOnShoulder + 20`), `respawnEntityOnShoulder`. - Triggers: `ServerPlayer.hurtServer`/`die`/`setGameMode`, `Player.startAutoSpinAttack`. ## 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:15:58 +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#4273
No description provided.