[PR #4308] [MERGED] A plain firework rocket from a crossbow flies past the first block, as in vanilla #5553

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

📋 Pull Request Information

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

Base: main ← Head: fix/crossbow-firework-impact


📝 Commits (5)

  • 48055aa Fireworks: a plain rocket shot at an angle flies past the first block
  • 5d4016c lan_e2e rocket-walls: count the rocket every tick in one ctl process
  • 835733c lan_e2e rocket-walls: measure each rocket's life in client ticks
  • d8b0934 Merge hr/main into fix/crossbow-firework-impact
  • 6f94677 Merge hr/main into fix/crossbow-firework-impact

📊 Changes

2 files changed (+43 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game/fireworks.rs (+5 -4)
📝 tools/lan_e2e.py (+38 -1)

📄 Description

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

What and why

Fixes #4281. A plain firework rocket fired from a crossbow vanished in a puff of white smoke at the first block it touched. In vanilla 26.3 it flies on, or slides along the wall, and only goes off when its lifetime ends.

Rockets shot at an angle (crossbows, dispensers) now explode on a block only when they have explosions, as FireworkRocketEntity.onHitBlock does:

if (this.level() instanceof ServerLevel level && this.hasExplosion()) { this.explode(level); }

Rockets with explosions already burst on impact on main, and still do. So do hits on entities and the end of a rocket's lifetime.

About the report: on main, a crossbow rocket with firework stars bursts on a wall and on a mob, and does damage (husk 20 → 14.25 HP). The reporter's video shows survival with ordinary rockets and white sparks at the wall, but no coloured burst. That matches a plain rocket going off early. In vanilla, a plain rocket never bursts with colour either.

Follow-up, left out of this PR: vanilla also explodes a rocket with explosions that is not shot at an angle when it hits a block, for example one launched up into a ceiling. Horizon doesn't yet. Doing it with box collision would set off rockets launched next to a wall early, so it needs the ray getHitResultOnMoveVector uses.

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

FireworkRocketEntity.tick, onHitBlock, hasExplosion, onHitEntity and explode, and Projectile.hitTargetOrDeflectSelf, read in 26.3 decompiled with tools/lab.py decompile.

Checked by a new lan_e2e check, rocket-walls. A dispenser, which shoots at an angle like a crossbow, fires at a stone wall three blocks away, once with a plain rocket and once with a rocket with explosions. The host samples its status in one horizon-ctl script, and each rocket's life is measured in client ticks. The plain rocket must live 14 ticks or more (its lifetime is 20–31), the one with explosions under 14, and both must be gone on host and guest at the end.

  • With this fix: 3/3 passes. Plain lived 25, 22 and 25 ticks; with explosions, 6.
  • On main, with only fireworks.rs reverted: fails with plain rocket went off on the wall (plain lived 6).
  • The existing fireworks check passes.
  • In game, from a crossbow: the plain rocket is still flying after the wall and puffs at the end of its lifetime; the rocket with explosions bursts red on the wall.

Self-check

pr_ready (tools/pr_ready.py --quick on DELL-JULES, against origin/main at ba6344a59, 6 min 32 s)

Check Result
Scope ✅ 2 files, +44 −6
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 480 run, FAILED (errors=1, skipped=2) (1 min 49 s)
rustfmt ✅ (9 s)
clippy ✅ (59 s)
tests: horizon-client ❌ 729 passed, 1 failed (3 min 17 s)
doc tests ✅ 0 passed (11 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): 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)

Both failures also fail on unmodified main on this Windows machine, independently of this change:

  • title::tests::each_world_preset_writes_its_own_generator (NotADirectory, os error 267)
  • the Python interpreter test

The lan_e2e runs above were made on Windows with local workarounds in a throwaway copy of the runner: directory junctions for symlinks, and a headless display. The check itself is unchanged.

Reviewed with sol-loop: 3 rounds with gpt-6.1-sol on high. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code; reproduction, checks and review by GPT 6.1 Sol (Codex).

🤖 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/4308 **Author:** [@JulesB40](https://github.com/JulesB40) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/crossbow-firework-impact` --- ### 📝 Commits (5) - [`48055aa`](https://github.com/horizon-rust/horizon/commit/48055aa98f085d9927207f3268d13b521b24719b) Fireworks: a plain rocket shot at an angle flies past the first block - [`5d4016c`](https://github.com/horizon-rust/horizon/commit/5d4016ca61d43535ab545982fd8429bd9a32064d) lan_e2e rocket-walls: count the rocket every tick in one ctl process - [`835733c`](https://github.com/horizon-rust/horizon/commit/835733c7fcfb8e694f6fe02d6b95829b7e83b758) lan_e2e rocket-walls: measure each rocket's life in client ticks - [`d8b0934`](https://github.com/horizon-rust/horizon/commit/d8b0934f657f1588ffccfae2e9ad6323556a0808) Merge hr/main into fix/crossbow-firework-impact - [`6f94677`](https://github.com/horizon-rust/horizon/commit/6f9467703ac07d3e5cba7a95e14d5b4575ca40ca) Merge hr/main into fix/crossbow-firework-impact ### 📊 Changes **2 files changed** (+43 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fireworks.rs` (+5 -4) 📝 `tools/lan_e2e.py` (+38 -1) </details> ### 📄 Description > 🤖 Opened by JulesB40's AI agent (Claude Code, Claude Opus 5.5), not by JulesB40 personally. ## What and why Fixes #4281. A plain firework rocket fired from a crossbow vanished in a puff of white smoke at the first block it touched. In vanilla 26.3 it flies on, or slides along the wall, and only goes off when its lifetime ends. Rockets shot at an angle (crossbows, dispensers) now explode on a block only when they have explosions, as `FireworkRocketEntity.onHitBlock` does: ```java if (this.level() instanceof ServerLevel level && this.hasExplosion()) { this.explode(level); } ``` Rockets with explosions already burst on impact on main, and still do. So do hits on entities and the end of a rocket's lifetime. About the report: on main, a crossbow rocket with firework stars bursts on a wall and on a mob, and does damage (husk 20 → 14.25 HP). The reporter's video shows survival with ordinary rockets and white sparks at the wall, but no coloured burst. That matches a plain rocket going off early. In vanilla, a plain rocket never bursts with colour either. Follow-up, left out of this PR: vanilla also explodes a rocket with explosions that is *not* shot at an angle when it hits a block, for example one launched up into a ceiling. Horizon doesn't yet. Doing it with box collision would set off rockets launched next to a wall early, so it needs the ray `getHitResultOnMoveVector` uses. ## 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 `FireworkRocketEntity.tick`, `onHitBlock`, `hasExplosion`, `onHitEntity` and `explode`, and `Projectile.hitTargetOrDeflectSelf`, read in 26.3 decompiled with `tools/lab.py decompile`. Checked by a new `lan_e2e` check, `rocket-walls`. A dispenser, which shoots at an angle like a crossbow, fires at a stone wall three blocks away, once with a plain rocket and once with a rocket with explosions. The host samples its status in one `horizon-ctl script`, and each rocket's life is measured in client ticks. The plain rocket must live 14 ticks or more (its lifetime is 20–31), the one with explosions under 14, and both must be gone on host and guest at the end. - With this fix: 3/3 passes. Plain lived 25, 22 and 25 ticks; with explosions, 6. - On main, with only `fireworks.rs` reverted: fails with `plain rocket went off on the wall` (plain lived 6). - The existing `fireworks` check passes. - In game, from a crossbow: the plain rocket is still flying after the wall and puffs at the end of its lifetime; the rocket with explosions bursts red on the wall. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DELL-JULES, against origin/main at ba6344a59, 6 min 32 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +44 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 480 run, FAILED (errors=1, skipped=2) (1 min 49 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (59 s) | | tests: horizon-client | ❌ 729 passed, 1 failed (3 min 17 s) | | doc tests | ✅ 0 passed (11 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): 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) | Both failures also fail on unmodified main on this Windows machine, independently of this change: - `title::tests::each_world_preset_writes_its_own_generator` (`NotADirectory`, os error 267) - the Python interpreter test The `lan_e2e` runs above were made on Windows with local workarounds in a throwaway copy of the runner: directory junctions for symlinks, and a headless display. The check itself is unchanged. Reviewed with sol-loop: 3 rounds with gpt-6.1-sol on high. Sol verdict: approved Created with Claude Opus 5.5 in Claude Code; reproduction, checks and review by GPT 6.1 Sol (Codex). 🤖 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>
bsakaguchi 2026-11-03 05:13:22 +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#5553
No description provided.