[PR #7061] [MERGED] Shearing a mooshroom sends its explosion particle #7306

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

📋 Pull Request Information

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

Base: main ← Head: fix/7027-mooshroom-shear-particle


📝 Commits (3)

  • 8391a68 Shearing a mooshroom sends its explosion particle
  • 4d229d5 Merge origin/main
  • 01325a2 Merge origin/main

📊 Changes

2 files changed (+20 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+19 -0)
📝 crates/horizon-client/src/game/dispenser.rs (+1 -0)

📄 Description

🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review.

Fixes #7027

What was wrong

MushroomCow.shear plays mooshroom_shear, converts the mooshroom to a cow, and the conversion callback calls ServerLevel.sendParticles with EXPLOSION: one particle at its x, getY(0.5) (half its height up) and z, zero spread and speed, before the mushrooms drop (read with javap on the 26.3 server jar). Horizon played the sound, made the cow and dropped the mushrooms, but sent no particle, neither when a player sheared it nor when a dispenser did.

What changed

  • game/creatures.rs: Game::mooshroom_shear_puff(at, height) draws the one explosion particle half the height up and sends it to the LAN guests; the player's shearing arm calls it before the drops.
  • game/dispenser.rs: the dispenser's mooshroom shearing calls it too, after the conversion and before the drops, as vanilla does.

How it was checked

In the game (horizon-ctl launch --offscreen, creative world), a mooshroom (NoAI) sheared:

  • by a dispenser holding shears, horizon-ctl status counts one explosion particle where a build of origin/main counted none;
  • by the player (interact-entity with shears in hand), horizon-ctl status did not show the particle in my runs, although a temporary print of the particle engine's own explosion count read none before and 1 right after the call (the print is not in this branch). I could not tell why status omits it on that path; the dispenser's does show.

No unit test: both paths go through Game, which has no fixture for a sheared mooshroom here.

Self-check

tools/pr_ready.py --quick --base origin/main:

Check Result
Scope 2 files, +20 −0
Cargo.lock unchanged
rustfmt, clippy ✅
tests: horizon-client ✅ 658 passed
mod API up to date ✅
Python tests 4 errors from my machine's setup (a global tests package, no launcher build), untouched here
Parity not run (--quick): the CI parity job picks the affected harnesses

Label: a fix, no feature label.


🔄 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/7061 **Author:** [@Akirabane](https://github.com/Akirabane) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/7027-mooshroom-shear-particle` --- ### 📝 Commits (3) - [`8391a68`](https://github.com/horizon-rust/horizon/commit/8391a68ee19ca2afd7266c31b127fecb8cf23ab3) Shearing a mooshroom sends its explosion particle - [`4d229d5`](https://github.com/horizon-rust/horizon/commit/4d229d571efe86d6b2d556bdbb9b4c45eee29e7a) Merge origin/main - [`01325a2`](https://github.com/horizon-rust/horizon/commit/01325a256671cb894d9005b28952275bdaf12e4c) Merge origin/main ### 📊 Changes **2 files changed** (+20 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+19 -0) 📝 `crates/horizon-client/src/game/dispenser.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review. Fixes #7027 ## What was wrong `MushroomCow.shear` plays `mooshroom_shear`, converts the mooshroom to a cow, and the conversion callback calls `ServerLevel.sendParticles` with `EXPLOSION`: one particle at its x, `getY(0.5)` (half its height up) and z, zero spread and speed, before the mushrooms drop (read with `javap` on the 26.3 server jar). Horizon played the sound, made the cow and dropped the mushrooms, but sent no particle, neither when a player sheared it nor when a dispenser did. ## What changed - `game/creatures.rs`: `Game::mooshroom_shear_puff(at, height)` draws the one `explosion` particle half the height up and sends it to the LAN guests; the player's shearing arm calls it before the drops. - `game/dispenser.rs`: the dispenser's mooshroom shearing calls it too, after the conversion and before the drops, as vanilla does. ## How it was checked In the game (`horizon-ctl launch --offscreen`, creative world), a mooshroom (`NoAI`) sheared: - by a dispenser holding shears, `horizon-ctl status` counts one `explosion` particle where a build of `origin/main` counted none; - by the player (`interact-entity` with shears in hand), `horizon-ctl status` did not show the particle in my runs, although a temporary print of the particle engine's own `explosion` count read none before and 1 right after the call (the print is not in this branch). I could not tell why `status` omits it on that path; the dispenser's does show. No unit test: both paths go through `Game`, which has no fixture for a sheared mooshroom here. ## Self-check `tools/pr_ready.py --quick --base origin/main`: | Check | Result | | --- | --- | | Scope | 2 files, +20 −0 | | Cargo.lock | unchanged | | rustfmt, clippy | ✅ | | tests: horizon-client | ✅ 658 passed | | mod API up to date | ✅ | | Python tests | 4 errors from my machine's setup (a global `tests` package, no launcher build), untouched here | | Parity | not run (`--quick`): the CI parity job picks the affected harnesses | Label: a fix, no `feature` label. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:27 +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#7306
No description provided.