[PR #6942] [MERGED] Baby villagers now make their baby-pitched sound when clicked #7216

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6942
Author: @DUzzL
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/6806-baby-villager-sound


📝 Commits (1)

  • 21f6f79 Baby villagers pitch their unhappy sound like vanilla

📊 Changes

1 file changed (+19 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/mobs/villager.rs (+19 -6)

📄 Description

🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself.

Fixes #6806

What/why: Right-clicking a baby villager played entity.villager.no at a fixed pitch of 1.0, the adult pitch. Vanilla plays it through Mob.makeSound, which uses LivingEntity.getVoicePitch (babies about 1.5, adults 1.0) and the sound volume. villager::set_unhappy (crates/horizon-client/src/mobs/villager.rs) now calls Mob::voice, as the other mob sounds do. This also advances the mob's random like vanilla. The wandering trader's unhappy sound goes through the same path.

Vanilla followed: Villager.mobInteract, Villager.setUnhappy (makeSound(VILLAGER_NO)), LivingEntity.getVoicePitch.

Evidence: new unit test mobs::villager::tests::the_unhappy_sound_uses_the_voice_pitch (adult pitch 0.8..1.2, baby 1.3..1.7); it passes with the fix. I did not run it against the old code, but the old code hard-coded 1.0, so the baby assertion cannot hold there. Not reproduced in the running game.

pr_ready (--quick):

Check Result
Scope 1 file, +19 -6
Public tree pass
Python tests 602 run, 1 error: test_world_input_capture.test_capture_lifecycle (capture.exe exit 101, known unrelated on this Windows machine)
rustfmt / clippy pass
tests: horizon-client-lib 1375 passed
doc tests pass
Parity 91 affected, left to CI (--quick)

🔄 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/6942 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6806-baby-villager-sound` --- ### 📝 Commits (1) - [`21f6f79`](https://github.com/horizon-rust/horizon/commit/21f6f79a320fe3f582a0c8eaa1c484791e0e00aa) Baby villagers pitch their unhappy sound like vanilla ### 📊 Changes **1 file changed** (+19 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/villager.rs` (+19 -6) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself. Fixes #6806 **What/why:** Right-clicking a baby villager played `entity.villager.no` at a fixed pitch of 1.0, the adult pitch. Vanilla plays it through `Mob.makeSound`, which uses `LivingEntity.getVoicePitch` (babies about 1.5, adults 1.0) and the sound volume. `villager::set_unhappy` (`crates/horizon-client/src/mobs/villager.rs`) now calls `Mob::voice`, as the other mob sounds do. This also advances the mob's random like vanilla. The wandering trader's unhappy sound goes through the same path. **Vanilla followed:** `Villager.mobInteract`, `Villager.setUnhappy` (`makeSound(VILLAGER_NO)`), `LivingEntity.getVoicePitch`. **Evidence:** new unit test `mobs::villager::tests::the_unhappy_sound_uses_the_voice_pitch` (adult pitch 0.8..1.2, baby 1.3..1.7); it passes with the fix. I did not run it against the old code, but the old code hard-coded 1.0, so the baby assertion cannot hold there. Not reproduced in the running game. **pr_ready (--quick):** | Check | Result | | --- | --- | | Scope | 1 file, +19 -6 | | Public tree | pass | | Python tests | 602 run, 1 error: `test_world_input_capture.test_capture_lifecycle` (capture.exe exit 101, known unrelated on this Windows machine) | | rustfmt / clippy | pass | | tests: horizon-client-lib | 1375 passed | | doc tests | pass | | Parity | 91 affected, left to CI (--quick) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:35:50 +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#7216
No description provided.