[PR #6284] [MERGED] Baby happy ghasts and nautiluses look like babies on a server #6768

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6284
Author: @some-du6e
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/6133-baby-ageables


📝 Commits (2)

  • 868069d Baby happy ghasts and nautiluses look like babies on a server
  • 02be029 A server's parrot or slime sent as a baby stays grown; fix the baby flag test

📊 Changes

2 files changed (+67 additions, -51 deletions)

View changed files

📝 crates/horizon-client/src/game/lan.rs (+15 -47)
📝 crates/horizon-client/src/game/remote_mob_data.rs (+52 -4)

📄 Description

Fixes #6133. On a server, a baby happy ghast (for example one that just hatched from a dried ghast) was drawn full size, with an adult's box that went through walls, while a vanilla player saw a baby. The same thing happened in single player, which runs on the server thread.

Cause. baby_index (game/lan.rs) gave each mob's DATA_BABY_ID entry from a hand-written list of entity ids. Eight of vanilla's 42 AgeableMob types were missing: happy_ghast, nautilus, zombie_nautilus, parrot, wandering_trader, camel_husk, slime and magma_cube. For those mobs a server's client ignored entry 16, and Horizon's own server never sent it.

Fix. baby_index now takes the Species and reads finalize::ageable for every AgeableMob. That list already matches vanilla's set exactly (I checked it against EntityTypes and the class hierarchy in the 26.3 server sources). The zombies, the zoglin (index 16) and the piglin (17) are kept as before.

The client also follows vanilla's AgeableMob.isBaby (canBeABaby() && getAge() < 0). A flag of true on a frog, parrot, slime, magma cube, camel husk or zombie nautilus (the six canBeABaby() == false overrides) still leaves the mob drawn grown, using drops::can_be_baby, which lists exactly those exceptions.

The minecart half of the issue (a villager in a minecart drawn where it stood instead of in the cart) is fixed on main. #4584 (merged 2026-10-31) added seat_cart_mobs to position_riders, which a server's client also runs. Before that, SetPassengers set the mount, but nothing seated a mob in a cart. That is the reported behaviour: the villager stays where it was, then appears at the cart once the cart breaks. The latest stable release (v0.2.97, 2026-10-28) predates #4584.

Test. a_happy_ghast_and_a_nautilus_take_their_babyhood builds minimal resources (so it runs without vanilla data), applies entry 16 to a happy ghast and a nautilus and checks is_baby(), then checks that a parrot sent the same flag stays grown. Builds and tests run in CI; nothing was built locally.

Note

Filed by Opus 5.5 using 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/6284 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6133-baby-ageables` --- ### 📝 Commits (2) - [`868069d`](https://github.com/horizon-rust/horizon/commit/868069dea7f26a92501d9603d03a42bdbcb25e32) Baby happy ghasts and nautiluses look like babies on a server - [`02be029`](https://github.com/horizon-rust/horizon/commit/02be02992c3d8757357935406baed611db448de2) A server's parrot or slime sent as a baby stays grown; fix the baby flag test ### 📊 Changes **2 files changed** (+67 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan.rs` (+15 -47) 📝 `crates/horizon-client/src/game/remote_mob_data.rs` (+52 -4) </details> ### 📄 Description Fixes #6133. On a server, a baby happy ghast (for example one that just hatched from a dried ghast) was drawn full size, with an adult's box that went through walls, while a vanilla player saw a baby. The same thing happened in single player, which runs on the server thread. **Cause.** `baby_index` (`game/lan.rs`) gave each mob's `DATA_BABY_ID` entry from a hand-written list of entity ids. Eight of vanilla's 42 `AgeableMob` types were missing: `happy_ghast`, `nautilus`, `zombie_nautilus`, `parrot`, `wandering_trader`, `camel_husk`, `slime` and `magma_cube`. For those mobs a server's client ignored entry 16, and Horizon's own server never sent it. **Fix.** `baby_index` now takes the `Species` and reads `finalize::ageable` for every AgeableMob. That list already matches vanilla's set exactly (I checked it against `EntityTypes` and the class hierarchy in the 26.3 server sources). The zombies, the zoglin (index 16) and the piglin (17) are kept as before. The client also follows vanilla's `AgeableMob.isBaby` (`canBeABaby() && getAge() < 0`). A flag of `true` on a frog, parrot, slime, magma cube, camel husk or zombie nautilus (the six `canBeABaby() == false` overrides) still leaves the mob drawn grown, using `drops::can_be_baby`, which lists exactly those exceptions. **The minecart half of the issue** (a villager in a minecart drawn where it stood instead of in the cart) is fixed on main. #4584 (merged 2026-10-31) added `seat_cart_mobs` to `position_riders`, which a server's client also runs. Before that, `SetPassengers` set the mount, but nothing seated a mob in a cart. That is the reported behaviour: the villager stays where it was, then appears at the cart once the cart breaks. The latest stable release (v0.2.97, 2026-10-28) predates #4584. **Test.** `a_happy_ghast_and_a_nautilus_take_their_babyhood` builds minimal resources (so it runs without vanilla data), applies entry 16 to a happy ghast and a nautilus and checks `is_baby()`, then checks that a parrot sent the same flag stays grown. Builds and tests run in CI; nothing was built locally. > [!NOTE] > Filed by Opus 5.5 using 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:26: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#6768
No description provided.