[PR #7575] Thrown snowballs, eggs and pearls leave bubbles underwater #7682

Open
opened 2026-11-03 07:21:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7575
Author: @razzo715
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/thrown-projectile-bubbles


📝 Commits (1)

  • 3df52be Thrown projectiles leave bubbles underwater (#7450)

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/remote_projectiles.rs (+14 -0)
📝 crates/horizon-client/src/projectiles.rs (+62 -0)

📄 Description

🤖 Opened by razzo715's AI agent (Claude Code, Claude Opus 5.5), not by razzo715 personally.

What and why

A snowball (or an egg, an ender pearl, an experience bottle, a content mod's throwable) travelling through water showed no bubbles: the client's projectile tick slowed it to 0.8 in water but never added vanilla's bubble trail. Arrows already have theirs (arrows.rs).

Projectile::water_bubbles gives where and how fast a throwable that is in water at the start of its tick puts its bubbles: a quarter of its motion behind it, at its motion after gravity. tick_remote_projectiles reads it before the tick and adds four BUBBLE particles for each, beside the smoke and shulker bullet trails. Only the client draws them, as in vanilla (addParticle does nothing on a server).

Thrown potions tick in game/potions.rs with their own type and are not covered here.

Tested in game on Windows (single player on its server thread): snowballs thrown into water now leave a bubble trail.

Fixes #7450

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

ThrowableProjectile.tick: handleFirstTickBubbleColumn, applyGravity, then applyInertia, which in water adds four ParticleTypes.BUBBLE at position() - getDeltaMovement() * 0.25 with getDeltaMovement() as their speed, before it scales the motion by 0.8F (read from the 26.3 client jar with javap -c). Its subclasses are Snowball, ThrownEgg, ThrownEnderpearl, ThrownExperienceBottle and AbstractThrownPotion.

No harness compares client particles. New unit test: projectiles::tests::throwables_in_water_leave_bubbles_behind_them.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on DESKTOP-Q5U547F, against upstream/main at b09827e93, 7 min 17 s)

Check Result
Scope ✅ 2 files, +76 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (1 min 58 s)
rustfmt ✅ (13 s)
Rust ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 5 s)
tests: horizon-client, horizon-client-lib ✅ 2154 passed (3 min 26 s)
doc tests ✅ 0 passed (6 s)
content root tests ➖ content root untouched
mod API up to date ✅ (24 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with 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/7575 **Author:** [@razzo715](https://github.com/razzo715) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/thrown-projectile-bubbles` --- ### 📝 Commits (1) - [`3df52be`](https://github.com/horizon-rust/horizon/commit/3df52bec267265f5d270d83d06847b7ea69a5566) Thrown projectiles leave bubbles underwater (#7450) ### 📊 Changes **2 files changed** (+76 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+14 -0) 📝 `crates/horizon-client/src/projectiles.rs` (+62 -0) </details> ### 📄 Description > 🤖 Opened by razzo715's AI agent (Claude Code, Claude Opus 5.5), not by razzo715 personally. ## What and why A snowball (or an egg, an ender pearl, an experience bottle, a content mod's throwable) travelling through water showed no bubbles: the client's projectile tick slowed it to 0.8 in water but never added vanilla's bubble trail. Arrows already have theirs (`arrows.rs`). `Projectile::water_bubbles` gives where and how fast a throwable that is in water at the start of its tick puts its bubbles: a quarter of its motion behind it, at its motion after gravity. `tick_remote_projectiles` reads it before the tick and adds four `BUBBLE` particles for each, beside the smoke and shulker bullet trails. Only the client draws them, as in vanilla (`addParticle` does nothing on a server). Thrown potions tick in `game/potions.rs` with their own type and are not covered here. Tested in game on Windows (single player on its server thread): snowballs thrown into water now leave a bubble trail. Fixes #7450 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `ThrowableProjectile.tick`: `handleFirstTickBubbleColumn`, `applyGravity`, then `applyInertia`, which in water adds four `ParticleTypes.BUBBLE` at `position() - getDeltaMovement() * 0.25` with `getDeltaMovement()` as their speed, before it scales the motion by 0.8F (read from the 26.3 client jar with `javap -c`). Its subclasses are `Snowball`, `ThrownEgg`, `ThrownEnderpearl`, `ThrownExperienceBottle` and `AbstractThrownPotion`. No harness compares client particles. New unit test: `projectiles::tests::throwables_in_water_leave_bubbles_behind_them`. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on DESKTOP-Q5U547F, against upstream/main at b09827e93, 7 min 17 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +76 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (1 min 58 s) | | rustfmt | ✅ (13 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 5 s) | | tests: horizon-client, horizon-client-lib | ✅ 2154 passed (3 min 26 s) | | doc tests | ✅ 0 passed (6 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (24 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7682
No description provided.