[PR #3949] [MERGED] Mob sounds and behaviour: fox, zoglin, turtle, iron golem, sheep, cat, nautilus, pig and more as vanilla #5314

Closed
opened 2026-11-03 05:11:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3949
Author: @kacpherek
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/split-mob-sounds-behaviour


📝 Commits (10+)

  • 1a80673 Worldgen: structure mobs save the fields vanilla's chunk keeps
  • 52f0e38 Add the amplified, large-biome and single-biome world types
  • 22054ee Worldgen: chunk generation spawns its animals as vanilla, ticking or not
  • 729a224 Read the test registry without the explicit deref
  • 0104eea Format the world preset test
  • 815c09b Merge #2214 (world presets in the create-world screen)
  • bca77d1 Merge origin/main
  • d0b42fb Merge #2570
  • e5ebedd Merge #2585
  • bc5ec6f Structure mobs test: pass the world preset #2570 added to for_dimension

📊 Changes

199 files changed (+6240 additions, -1133 deletions)

View changed files

📝 README.md (+3 -0)
📝 crates/horizon-bots/src/main.rs (+255 -7)
📝 crates/horizon-client-render/src/assets.rs (+16 -2)
📝 crates/horizon-client-render/src/block_entity_render.rs (+11 -1)
📝 crates/horizon-client-render/src/brewing.rs (+35 -16)
📝 crates/horizon-client-render/src/datapack.rs (+46 -1)
📝 crates/horizon-client-render/src/gfx.rs (+14 -8)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
➕ crates/horizon-client-render/src/section_mask.rs (+164 -0)
📝 crates/horizon-client-render/src/sprites.rs (+14 -0)
📝 crates/horizon-client-render/src/streaming.rs (+90 -18)
📝 crates/horizon-client-render/src/world.rs (+20 -15)
📝 crates/horizon-client/examples/mod_port_probe.rs (+4 -3)
📝 crates/horizon-client/examples/portal_scan_bench.rs (+5 -7)
📝 crates/horizon-client/examples/probe/block_entity_anim_fixture.rs (+2 -1)
📝 crates/horizon-client/examples/probe/block_transform_fixture.rs (+2 -1)
📝 crates/horizon-client/examples/probe/cauldron_fixture.rs (+4 -3)
📝 crates/horizon-client/examples/probe/creative_mining_probe.rs (+2 -1)
📝 crates/horizon-client/examples/probe/enchanting_fixture.rs (+2 -1)
📝 crates/horizon-client/examples/probe/entity_anim_fixture.rs (+1 -0)

...and 80 more files

📄 Description

What and why

  • Play the fox sleep sound while a fox naps: A sleeping fox played its day ambient; Fox.getAmbientSound returns FOX_SLEEP while sleeping (Fox.java:677).
  • Growl the angry zoglin sound while it has a target: A zoglin with an attack target grunted its ambient instead of entity.zoglin.angry; Zoglin.getAmbientSound picks ZOGLIN_ANGRY when ATTACK_TARGET is set (Zoglin.java:286).
  • Keep turtles silent in water and as babies: Turtles in water or babies played the land ambient; Turtle.getAmbientSound plays TURTLE_AMBIENT_LAND only on land and grown up, else Mob's silent default (Turtle.java:176).
  • Play the fox bite sound after each melee strike: A fox's melee strike made no sound; FoxMeleeAttackGoal plays FOX_BITE after doHurtTarget (Fox.java:1101).
  • Play the iron golem damage sound when it cracks: Hits that moved an iron golem to a new crack level were silent; IronGolem.hurtServer plays IRON_GOLEM_DAMAGE then (IronGolem.java:209).
  • Put a wolf's leash rope at 0.6 of its eye height: The rope point was at full eye height; Wolf.getLeashOffset (Wolf.java:659) uses 0.6 times it.
  • Mix both parents' dye colours for sheep, wolf and cat babies: A baby took one parent's colour by a coin flip; DyeColor.getMixedColor mixes them with the two-dye crafting recipe, else picks one (Sheep.java:281, Wolf.java:608, Cat.java:383).
  • Hurt an Enderman that a splash water potion lands near: A water splash did nothing to an Enderman; AbstractThrownPotion.affectEntitiesAround hurts it 1 and Enderman.hurtWithCleanWater makes it teleport.
  • Cull lightning bolts beyond 64 blocks times the view scale: A bolt past 64 blocks (scaled by the entity distance) was still drawn; vanilla keeps only the sky flash and thunder there (LightningBolt.java:250).
  • Lower a sheep's head to eat grass on every client: Sheep.handleEntityEvent(10) sets eatAnimationTick to 40 and EatBlockGoal.start broadcasts event 10 (Sheep.java:119, EatBlockGoal.java:40); the server now sends it and clients start and count down the eating head.
  • Let a cat lured with fish approach its picked player unscared: CatTemptGoal keeps a selectedPlayer re-rolled every 500 to 600 ticks and does not scare it (Cat.java:677).
  • Keep a tame nautilus near its home, within 32 or 16 blocks: AbstractNautilus.checkRestriction sets the home at the nautilus with getNautilusRestrictionRadius (32, or 16 for a baby or saddled one) when it is not leashed or ridden (AbstractNautilus.java:237, :241).
  • Feed a saddled pig held food instead of mounting it: Pig.mobInteract and Strider.mobInteract take a click holding food to Animal.mobInteract before any ride (Pig.java:167, Strider.java:401).
  • Save and load a fox's sleeping, sitting and crouching flags: Fox.addAdditionalSaveData writes Sleeping, Sitting and Crouching from its flags and Fox.readAdditionalSaveData reads them back; a reload no longer wakes a sleeping fox (Fox.java:445). Trusted players are still not ported.
  • Play the tadpole grow-up sound at volume 0.15: Tadpole.ageUp plays TADPOLE_GROW_UP at 0.15 from the tadpole's position, not at full volume from the eyes (Tadpole.java:227).
  • Show the crumbs of the food a fox is eating: Fox.handleEntityEvent(45) throws eight item crumbs from in front of its mouth; the server broadcasts 45 with the eating sound (Fox.java:289, :227).
  • Spawn the crumbs when a held tool or armour piece breaks: A tool or armour piece that broke made no crumb particles; vanilla spawns five item crumbs for it (LivingEntity.java:1516 breakItem).
  • Ignore knockback on a creaking that cannot move: A creaking a player looks at still got shoved by hits; vanilla ignores knockback while it cannot move (Creaking.java:451 knockback).
  • Start a gliding player's rocket half a block out at the rocket hand: The rocket of a gliding player started at the player's feet; vanilla offsets it 0.5 block toward the hand holding it (Entity.java:2688 getHandHoldingItemAngle, FireworkRocketEntity.java:138).
  • Play the hoglin retreat grunt near a repellent: A hoglin near a repellent made no retreat grunt; vanilla plays entity.hoglin.retreat there (HoglinAi.java:231 getSoundForActivity).

Vanilla reference

Each commit message names the vanilla method and file it follows: Fox.java:677, Zoglin.java:286, Turtle.java:176, Fox.java:1101, IronGolem.java:209, Wolf.java:659, Sheep.java:281, Wolf.java:608, Cat.java:383, LightningBolt.java:250, Sheep.java:119, EatBlockGoal.java:40, Cat.java:677, AbstractNautilus.java:237, Pig.java:167, Strider.java:401, Fox.java:445, Tadpole.java:227, Fox.java:289, LivingEntity.java:1516, Creaking.java:451, Entity.java:2688, FireworkRocketEntity.java:138, HoglinAi.java:231

Self-check

Split out of #3926; rustfmt on changed files; built by CI; not run in game.


🔄 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/3949 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/split-mob-sounds-behaviour` --- ### 📝 Commits (10+) - [`1a80673`](https://github.com/horizon-rust/horizon/commit/1a80673d50561657398e977cdd4618b1011a5c07) Worldgen: structure mobs save the fields vanilla's chunk keeps - [`52f0e38`](https://github.com/horizon-rust/horizon/commit/52f0e38d4157f13c1547ffebf85cc930bd914d3f) Add the amplified, large-biome and single-biome world types - [`22054ee`](https://github.com/horizon-rust/horizon/commit/22054eee9000528cec04c9c95c4885248f9a8112) Worldgen: chunk generation spawns its animals as vanilla, ticking or not - [`729a224`](https://github.com/horizon-rust/horizon/commit/729a224eefe003cf08f4b8496c6344b8bd992c99) Read the test registry without the explicit deref - [`0104eea`](https://github.com/horizon-rust/horizon/commit/0104eeaf33853c0ac6a3b56f4715c012408cc291) Format the world preset test - [`815c09b`](https://github.com/horizon-rust/horizon/commit/815c09b1f8d3a011b8f93273aa94a2c152c43ac9) Merge #2214 (world presets in the create-world screen) - [`bca77d1`](https://github.com/horizon-rust/horizon/commit/bca77d1ac4af96674a51b828d05e8247b59d4670) Merge origin/main - [`d0b42fb`](https://github.com/horizon-rust/horizon/commit/d0b42fb88e7b94341f13c8f45b09b3e9f5115613) Merge #2570 - [`e5ebedd`](https://github.com/horizon-rust/horizon/commit/e5ebeddb904c71fce6615b3b1c8de9d515a0a5eb) Merge #2585 - [`bc5ec6f`](https://github.com/horizon-rust/horizon/commit/bc5ec6fb462aa524ff26dfbdaf5a9e2e6fb3da17) Structure mobs test: pass the world preset #2570 added to for_dimension ### 📊 Changes **199 files changed** (+6240 additions, -1133 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -0) 📝 `crates/horizon-bots/src/main.rs` (+255 -7) 📝 `crates/horizon-client-render/src/assets.rs` (+16 -2) 📝 `crates/horizon-client-render/src/block_entity_render.rs` (+11 -1) 📝 `crates/horizon-client-render/src/brewing.rs` (+35 -16) 📝 `crates/horizon-client-render/src/datapack.rs` (+46 -1) 📝 `crates/horizon-client-render/src/gfx.rs` (+14 -8) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) ➕ `crates/horizon-client-render/src/section_mask.rs` (+164 -0) 📝 `crates/horizon-client-render/src/sprites.rs` (+14 -0) 📝 `crates/horizon-client-render/src/streaming.rs` (+90 -18) 📝 `crates/horizon-client-render/src/world.rs` (+20 -15) 📝 `crates/horizon-client/examples/mod_port_probe.rs` (+4 -3) 📝 `crates/horizon-client/examples/portal_scan_bench.rs` (+5 -7) 📝 `crates/horizon-client/examples/probe/block_entity_anim_fixture.rs` (+2 -1) 📝 `crates/horizon-client/examples/probe/block_transform_fixture.rs` (+2 -1) 📝 `crates/horizon-client/examples/probe/cauldron_fixture.rs` (+4 -3) 📝 `crates/horizon-client/examples/probe/creative_mining_probe.rs` (+2 -1) 📝 `crates/horizon-client/examples/probe/enchanting_fixture.rs` (+2 -1) 📝 `crates/horizon-client/examples/probe/entity_anim_fixture.rs` (+1 -0) _...and 80 more files_ </details> ### 📄 Description ## What and why - Play the fox sleep sound while a fox naps: A sleeping fox played its day ambient; Fox.getAmbientSound returns FOX_SLEEP while sleeping (Fox.java:677). - Growl the angry zoglin sound while it has a target: A zoglin with an attack target grunted its ambient instead of entity.zoglin.angry; Zoglin.getAmbientSound picks ZOGLIN_ANGRY when ATTACK_TARGET is set (Zoglin.java:286). - Keep turtles silent in water and as babies: Turtles in water or babies played the land ambient; Turtle.getAmbientSound plays TURTLE_AMBIENT_LAND only on land and grown up, else Mob's silent default (Turtle.java:176). - Play the fox bite sound after each melee strike: A fox's melee strike made no sound; FoxMeleeAttackGoal plays FOX_BITE after doHurtTarget (Fox.java:1101). - Play the iron golem damage sound when it cracks: Hits that moved an iron golem to a new crack level were silent; IronGolem.hurtServer plays IRON_GOLEM_DAMAGE then (IronGolem.java:209). - Put a wolf's leash rope at 0.6 of its eye height: The rope point was at full eye height; Wolf.getLeashOffset (Wolf.java:659) uses 0.6 times it. - Mix both parents' dye colours for sheep, wolf and cat babies: A baby took one parent's colour by a coin flip; DyeColor.getMixedColor mixes them with the two-dye crafting recipe, else picks one (Sheep.java:281, Wolf.java:608, Cat.java:383). - Hurt an Enderman that a splash water potion lands near: A water splash did nothing to an Enderman; AbstractThrownPotion.affectEntitiesAround hurts it 1 and Enderman.hurtWithCleanWater makes it teleport. - Cull lightning bolts beyond 64 blocks times the view scale: A bolt past 64 blocks (scaled by the entity distance) was still drawn; vanilla keeps only the sky flash and thunder there (LightningBolt.java:250). - Lower a sheep's head to eat grass on every client: Sheep.handleEntityEvent(10) sets eatAnimationTick to 40 and EatBlockGoal.start broadcasts event 10 (Sheep.java:119, EatBlockGoal.java:40); the server now sends it and clients start and count down the eating head. - Let a cat lured with fish approach its picked player unscared: CatTemptGoal keeps a selectedPlayer re-rolled every 500 to 600 ticks and does not scare it (Cat.java:677). - Keep a tame nautilus near its home, within 32 or 16 blocks: AbstractNautilus.checkRestriction sets the home at the nautilus with getNautilusRestrictionRadius (32, or 16 for a baby or saddled one) when it is not leashed or ridden (AbstractNautilus.java:237, :241). - Feed a saddled pig held food instead of mounting it: Pig.mobInteract and Strider.mobInteract take a click holding food to Animal.mobInteract before any ride (Pig.java:167, Strider.java:401). - Save and load a fox's sleeping, sitting and crouching flags: Fox.addAdditionalSaveData writes Sleeping, Sitting and Crouching from its flags and Fox.readAdditionalSaveData reads them back; a reload no longer wakes a sleeping fox (Fox.java:445). Trusted players are still not ported. - Play the tadpole grow-up sound at volume 0.15: Tadpole.ageUp plays TADPOLE_GROW_UP at 0.15 from the tadpole's position, not at full volume from the eyes (Tadpole.java:227). - Show the crumbs of the food a fox is eating: Fox.handleEntityEvent(45) throws eight item crumbs from in front of its mouth; the server broadcasts 45 with the eating sound (Fox.java:289, :227). - Spawn the crumbs when a held tool or armour piece breaks: A tool or armour piece that broke made no crumb particles; vanilla spawns five item crumbs for it (LivingEntity.java:1516 breakItem). - Ignore knockback on a creaking that cannot move: A creaking a player looks at still got shoved by hits; vanilla ignores knockback while it cannot move (Creaking.java:451 knockback). - Start a gliding player's rocket half a block out at the rocket hand: The rocket of a gliding player started at the player's feet; vanilla offsets it 0.5 block toward the hand holding it (Entity.java:2688 getHandHoldingItemAngle, FireworkRocketEntity.java:138). - Play the hoglin retreat grunt near a repellent: A hoglin near a repellent made no retreat grunt; vanilla plays entity.hoglin.retreat there (HoglinAi.java:231 getSoundForActivity). ## Vanilla reference Each commit message names the vanilla method and file it follows: Fox.java:677, Zoglin.java:286, Turtle.java:176, Fox.java:1101, IronGolem.java:209, Wolf.java:659, Sheep.java:281, Wolf.java:608, Cat.java:383, LightningBolt.java:250, Sheep.java:119, EatBlockGoal.java:40, Cat.java:677, AbstractNautilus.java:237, Pig.java:167, Strider.java:401, Fox.java:445, Tadpole.java:227, Fox.java:289, LivingEntity.java:1516, Creaking.java:451, Entity.java:2688, FireworkRocketEntity.java:138, HoglinAi.java:231 ## Self-check Split out of #3926; rustfmt on changed files; built by CI; not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:43 +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#5314
No description provided.