[PR #6474] [MERGED] Mobs and dropped items at the top of a bubble column send its surface particles #6899

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

📋 Pull Request Information

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

Base: main ← Head: fix/5768-bubble-column-particles


📝 Commits (2)

  • 3df30d4 Mobs and dropped items at the top of a bubble column send its surface particles
  • 7255d00 Merge origin/main into fix/5768-bubble-column-particles

📊 Changes

7 files changed (+160 additions, -39 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+47 -0)
📝 crates/horizon-client/src/game.rs (+15 -0)
📝 crates/horizon-client/src/game/creatures.rs (+30 -30)
📝 crates/horizon-client/src/mobs.rs (+5 -0)
📝 crates/horizon-client/src/mobs/living.rs (+10 -2)
📝 crates/horizon-client/src/motion.rs (+1 -1)
📝 crates/horizon-client/src/motion/fluids.rs (+52 -6)

📄 Description

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

Refs #5768 (the gap kacpherek named in his comment there: the surface particles of a bubble column for anything but the player).

What was wrong

Entity.handleOnAboveBubbleColumn ends with sendBubbleColumnParticles for every entity that is at the top of a bubble column: two SPLASH and two BUBBLE particles over the column block, which the server sends to the players around (read with javap on the 26.3 server jar). Horizon showed them for the player and for arrows only, so a mob or a dropped item riding a column showed nothing at its surface.

What changed

  • motion::bubble_column_push_over and bubble_column_surfaces: the push that mobs and items already use, now telling which column blocks the entity is at the top of (bubble_column_push is unchanged for its other callers).
  • A mob's applyEffectsFromBlocks step queues a new MobEvent::BubbleColumnParticles { pos }; the host's item loop asks bubble_column_surfaces after each item's tick (only where the items are authoritative, like merging: a client of a server gets the server's particles).
  • One Game::bubble_column_particles draws them (the level random places them, as vanilla) and sends them to the LAN guests, as MobEvent::LevelParticles does. The arrow event uses it too, so an arrow's particles reach the guests now (before, only the host saw them).

Not done here, left for later: ender pearls, primed TNT and armor stands call the same push and still show nothing at the top of a column (each is a one-line follow-up with the new helper).

How it was checked

A glass shaft with a soul sand column (/fill, /setblock), with a pig and two items summoned inside, in a creative world, headless (horizon-ctl launch --offscreen). status reports a counter per particle type:

Build Particles after 11 s
main (a build from this afternoon, before the change) no splash and no bubble counter at all
this branch, pig + 2 items splash 654, bubble 654
this branch, the pig alone splash 286, bubble 286
this branch, the 2 items alone splash 360, bubble 360

splash and bubble are equal because each call sends two of each. Unit test an_item_at_the_top_of_a_bubble_column_is_at_its_surface: an item inside the column reports no surface, one in its top block (or straddling it) reports that block, one above it reports none.

Self-check

tools/pr_ready.py --quick --base origin/main (before merging the latest main into the branch):

Check Result
Scope 7 files, +160 −39
Cargo.lock unchanged
rustfmt ✅
clippy ✅
tests: horizon-client, horizon-client-lib 585 passed, 2 failed: native_hooks::native_breathing_stays_hookable and native_loot_kinds_stay_hookable read a source file with LF line endings; they fail the same way on my Windows checkout without this change
Python tests 1 error: test_port_ledger (a global tests package shadows the repo's on my machine), not touched here
Parity not run (--quick): the CI parity job picks the harnesses

Label: a fix for players, 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/6474 **Author:** [@Akirabane](https://github.com/Akirabane) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5768-bubble-column-particles` --- ### 📝 Commits (2) - [`3df30d4`](https://github.com/horizon-rust/horizon/commit/3df30d4d841813363d6e977b2b1276fca3e1b0dc) Mobs and dropped items at the top of a bubble column send its surface particles - [`7255d00`](https://github.com/horizon-rust/horizon/commit/7255d001cc97aaef5b6f3842be84c9a64b8710b4) Merge origin/main into fix/5768-bubble-column-particles ### 📊 Changes **7 files changed** (+160 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+47 -0) 📝 `crates/horizon-client/src/game.rs` (+15 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+30 -30) 📝 `crates/horizon-client/src/mobs.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/living.rs` (+10 -2) 📝 `crates/horizon-client/src/motion.rs` (+1 -1) 📝 `crates/horizon-client/src/motion/fluids.rs` (+52 -6) </details> ### 📄 Description > 🤖 Opened by both Akirabane's AI agent (Claude Code), and Akirabane Himself after his review. Refs #5768 (the gap kacpherek named in his comment there: the surface particles of a bubble column for anything but the player). ## What was wrong `Entity.handleOnAboveBubbleColumn` ends with `sendBubbleColumnParticles` for every entity that is at the top of a bubble column: two `SPLASH` and two `BUBBLE` particles over the column block, which the server sends to the players around (read with `javap` on the 26.3 server jar). Horizon showed them for the player and for arrows only, so a mob or a dropped item riding a column showed nothing at its surface. ## What changed - `motion::bubble_column_push_over` and `bubble_column_surfaces`: the push that mobs and items already use, now telling which column blocks the entity is at the top of (`bubble_column_push` is unchanged for its other callers). - A mob's `applyEffectsFromBlocks` step queues a new `MobEvent::BubbleColumnParticles { pos }`; the host's item loop asks `bubble_column_surfaces` after each item's tick (only where the items are authoritative, like merging: a client of a server gets the server's particles). - One `Game::bubble_column_particles` draws them (the level random places them, as vanilla) and sends them to the LAN guests, as `MobEvent::LevelParticles` does. The arrow event uses it too, so an arrow's particles reach the guests now (before, only the host saw them). Not done here, left for later: ender pearls, primed TNT and armor stands call the same push and still show nothing at the top of a column (each is a one-line follow-up with the new helper). ## How it was checked A glass shaft with a soul sand column (`/fill`, `/setblock`), with a pig and two items summoned inside, in a creative world, headless (`horizon-ctl launch --offscreen`). `status` reports a counter per particle type: | Build | Particles after 11 s | | --- | --- | | main (a build from this afternoon, before the change) | no `splash` and no `bubble` counter at all | | this branch, pig + 2 items | `splash` 654, `bubble` 654 | | this branch, the pig alone | `splash` 286, `bubble` 286 | | this branch, the 2 items alone | `splash` 360, `bubble` 360 | `splash` and `bubble` are equal because each call sends two of each. Unit test `an_item_at_the_top_of_a_bubble_column_is_at_its_surface`: an item inside the column reports no surface, one in its top block (or straddling it) reports that block, one above it reports none. ## Self-check `tools/pr_ready.py --quick --base origin/main` (before merging the latest main into the branch): | Check | Result | | --- | --- | | Scope | 7 files, +160 −39 | | Cargo.lock | unchanged | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client, horizon-client-lib | 585 passed, 2 failed: `native_hooks::native_breathing_stays_hookable` and `native_loot_kinds_stay_hookable` read a source file with LF line endings; they fail the same way on my Windows checkout without this change | | Python tests | 1 error: `test_port_ledger` (a global `tests` package shadows the repo's on my machine), not touched here | | Parity | not run (`--quick`): the CI parity job picks the harnesses | Label: a fix for players, 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:28:48 +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#6899
No description provided.