[PR #4315] [MERGED] A firework rocket with stars bursts on any block it hits, as in vanilla #5556

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

📋 Pull Request Information

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

Base: main ← Head: fix/rocket-block-hits


📝 Commits (3)

  • 4e86e20 Fireworks: every free rocket with explosions goes off on a block
  • 191fc33 lan_e2e rocket-ceilings: a star rocket must rise before it bursts
  • 0b2ed91 Merge hr/main into fix/rocket-block-hits

📊 Changes

2 files changed (+63 additions, -28 deletions)

View changed files

📝 crates/horizon-client/src/game/fireworks.rs (+27 -26)
📝 tools/lan_e2e.py (+36 -2)

📄 Description

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

Carries #4308. Review only the last two commits, 4e86e200a and 191fc3302. The first three are #4308's and drop out once it merges.

What and why

A firework rocket with stars launched from the ground stayed stuck under a ceiling until its lifetime ran out, then burst there. In vanilla 26.3 it bursts as soon as it hits the ceiling.

FireworkRocketEntity.tick checks every rocket's move against blocks (ProjectileUtil.getHitResultOnMoveVector, ClipContext.Block.COLLIDER), not only rockets shot at an angle. onHitBlock then explodes it when it hasExplosion(). Horizon did that only for crossbow and dispenser rockets, which #4308 made follow the hasExplosion() rule.

rocket_struck already casts that ray, ending at the block it clips, and looks for entities along it. It now also reports the block hit. tick_rockets sets off any rocket it checks when it hits a block, as long as the rocket has explosions; plain rockets fly on. Entity hits still come first. Angled rockets now use the same ray instead of their box's collision.

Follow-up, left out: a rocket boosting a player who joins a server (single player's own player included) runs no hit check at all on main, for entities or blocks. The server doesn't keep that player's movement per tick to cast the ray from. This only matters for elytra boosting with rockets with stars, which hurt the flyer.

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 and onHitEntity, and Projectile.hitTargetOrDeflectSelf, read in 26.3 decompiled with tools/lab.py decompile.

Checked by a new lan_e2e check, rocket-ceilings. The host launches a rocket from the floor under a stone ceiling two blocks up, once plain and once with explosions. Each rocket's life is measured in client ticks, sampled in one horizon-ctl script. The plain rocket must live 14 ticks or more (its lifetime is 20–31); the one with explosions must live 3 to 13 ticks, so a burst at launch fails. Both must be gone on host and guest at the end.

  • With this change: 3/3 passes. Plain lived 25, 20 and 30 ticks; with explosions, 7 each time.
  • On #4308's head, with only fireworks.rs reverted: fails with star rocket did not explode on the ceiling (it lived 26).
  • #4308's rocket-walls passes 2/2 on the new ray (plain/with explosions: 20/6 and 25/6 ticks), and the existing fireworks check passes.
  • In game: rockets launched from the floor in open air, and against a wall face, don't go off at launch. They burst when their lifetime ends.

Self-check

pr_ready (tools/pr_ready.py --quick on DELL-JULES, against origin/main at ba6344a59, 4 min 40 s; scope includes the carried #4308)

Check Result
Scope ✅ 2 files, +100 −27
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 480 run, FAILED (errors=1, skipped=2) (1 min 45 s)
rustfmt ✅ (9 s)
clippy ✅ (19 s)
tests: horizon-client ❌ 729 passed, 1 failed (1 min 51 s)
doc tests ✅ 0 passed (29 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 were made on Windows with local workarounds in a throwaway copy of the runner: directory junctions for symlinks, and a headless display. The checks themselves are unchanged.

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

Created with Claude Opus 5.5 in Claude Code; 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/4315 **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/rocket-block-hits` --- ### 📝 Commits (3) - [`4e86e20`](https://github.com/horizon-rust/horizon/commit/4e86e200a59ad9c5008f578c3fa298abc0a5cf20) Fireworks: every free rocket with explosions goes off on a block - [`191fc33`](https://github.com/horizon-rust/horizon/commit/191fc3302d362f98178bfd95bd8d8bd6dc0e1141) lan_e2e rocket-ceilings: a star rocket must rise before it bursts - [`0b2ed91`](https://github.com/horizon-rust/horizon/commit/0b2ed9162a6bc567bd0adce8e7d6ea665327b2aa) Merge hr/main into fix/rocket-block-hits ### 📊 Changes **2 files changed** (+63 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fireworks.rs` (+27 -26) 📝 `tools/lan_e2e.py` (+36 -2) </details> ### 📄 Description > 🤖 Opened by JulesB40's AI agent (Claude Code, Claude Opus 5.5), not by JulesB40 personally. > **Carries #4308.** Review only the last two commits, `4e86e200a` and `191fc3302`. The first three are #4308's and drop out once it merges. ## What and why A firework rocket with stars launched from the ground stayed stuck under a ceiling until its lifetime ran out, then burst there. In vanilla 26.3 it bursts as soon as it hits the ceiling. `FireworkRocketEntity.tick` checks every rocket's move against blocks (`ProjectileUtil.getHitResultOnMoveVector`, `ClipContext.Block.COLLIDER`), not only rockets shot at an angle. `onHitBlock` then explodes it when it `hasExplosion()`. Horizon did that only for crossbow and dispenser rockets, which #4308 made follow the `hasExplosion()` rule. `rocket_struck` already casts that ray, ending at the block it clips, and looks for entities along it. It now also reports the block hit. `tick_rockets` sets off any rocket it checks when it hits a block, as long as the rocket has explosions; plain rockets fly on. Entity hits still come first. Angled rockets now use the same ray instead of their box's collision. Follow-up, left out: a rocket boosting a player who joins a server (single player's own player included) runs no hit check at all on main, for entities or blocks. The server doesn't keep that player's movement per tick to cast the ray from. This only matters for elytra boosting with rockets with stars, which hurt the flyer. ## 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` and `onHitEntity`, and `Projectile.hitTargetOrDeflectSelf`, read in 26.3 decompiled with `tools/lab.py decompile`. Checked by a new `lan_e2e` check, `rocket-ceilings`. The host launches a rocket from the floor under a stone ceiling two blocks up, once plain and once with explosions. Each rocket's life is measured in client ticks, sampled in one `horizon-ctl script`. The plain rocket must live 14 ticks or more (its lifetime is 20–31); the one with explosions must live 3 to 13 ticks, so a burst at launch fails. Both must be gone on host and guest at the end. - With this change: 3/3 passes. Plain lived 25, 20 and 30 ticks; with explosions, 7 each time. - On #4308's head, with only `fireworks.rs` reverted: fails with `star rocket did not explode on the ceiling` (it lived 26). - #4308's `rocket-walls` passes 2/2 on the new ray (plain/with explosions: 20/6 and 25/6 ticks), and the existing `fireworks` check passes. - In game: rockets launched from the floor in open air, and against a wall face, don't go off at launch. They burst when their lifetime ends. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DELL-JULES, against origin/main at ba6344a59, 4 min 40 s; scope includes the carried #4308) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +100 −27 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 480 run, FAILED (errors=1, skipped=2) (1 min 45 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (19 s) | | tests: horizon-client | ❌ 729 passed, 1 failed (1 min 51 s) | | doc tests | ✅ 0 passed (29 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 were made on Windows with local workarounds in a throwaway copy of the runner: directory junctions for symlinks, and a headless display. The checks themselves are unchanged. Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high. Sol verdict: approved Created with Claude Opus 5.5 in Claude Code; 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:23 +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#5556
No description provided.