[PR #1251] [MERGED] Fix firework tooltip translations #3457

Closed
opened 2026-11-03 04:09:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1251
Author: @rdbtCVS
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: t3/fix-firework-tooltip-display


📝 Commits (1)

  • a97d809 Fix firework tooltip translations

📊 Changes

4 files changed (+67 additions, -4 deletions)

View changed files

📝 crates/horizon-client/examples/firework_tooltip_fixture.rs (+4 -3)
📝 crates/horizon-client/src/enchant.rs (+2 -0)
📝 crates/horizon-client/src/item_tooltip.rs (+59 -0)
📝 tools/test_firework_tooltip_parity.py (+2 -1)

📄 Description

What and why

Hovering a firework rocket showed item.minecraft.firework_rocket.flight_duration instead of “Flight Duration: 1”. The inventory uses Enchantments::load for tooltip translations, but its filter discarded both rocket and firework-star keys. Retain those two key prefixes so flight duration, explosion shapes/counts, colors, fades, trails and twinkles display correctly.

Add a unit regression through the production translation loader, and make the existing firework parity fixture use that same loader. The previous fixture loaded the complete language map and missed this bug.

Vanilla reference

Pinned Minecraft 26.3 Fireworks.addToTooltip, Fireworks.addExplosionTooltip, and FireworkExplosion.addToTooltip / addAdditionalTooltip (bytecode inspected with javap).

tools/test_firework_tooltip_parity.py compares the production tooltip path with VanillaFireworkTooltipOracle. All 3,000 cases matched in three consecutive runs. Both the updated parity fixture and the new unit regression failed before the fix; the unit regression passes afterward.

Self-check

Run with RUST_TEST_THREADS=1 CARGO_BUILD_JOBS=3 python3 tools/pr_ready.py --quick --base origin/main. The initial parallel Rust test run exited with a native SIGSEGV during graphics tests; the complete serial rerun passed. The broad parity suite is listed below; the firework harness was run separately as described above.

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 022600481, 7 min 28 s)

Check Result
Scope ✅ 4 files, +67 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 290 passed (22 s)
rustfmt ✅ (5 s)
clippy ✅
tests: horizon-client ✅ 1109 passed (6 min 54 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 279 affected, to run in CI (--quick): ambient_sound, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo, basic_feature, biome_chunk, biome_generation and 267 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Visual verification

Verified in a running creative inventory: a default rocket displays “Firework Rocket” and “Flight Duration: 1”. An in-game screenshot was captured and checked in the task workspace.


🔄 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/1251 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/fix-firework-tooltip-display` --- ### 📝 Commits (1) - [`a97d809`](https://github.com/horizon-rust/horizon/commit/a97d8098c7a5ac9ba9c1043035b26a3ad1134606) Fix firework tooltip translations ### 📊 Changes **4 files changed** (+67 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/firework_tooltip_fixture.rs` (+4 -3) 📝 `crates/horizon-client/src/enchant.rs` (+2 -0) 📝 `crates/horizon-client/src/item_tooltip.rs` (+59 -0) 📝 `tools/test_firework_tooltip_parity.py` (+2 -1) </details> ### 📄 Description ## What and why Hovering a firework rocket showed `item.minecraft.firework_rocket.flight_duration` instead of “Flight Duration: 1”. The inventory uses `Enchantments::load` for tooltip translations, but its filter discarded both rocket and firework-star keys. Retain those two key prefixes so flight duration, explosion shapes/counts, colors, fades, trails and twinkles display correctly. Add a unit regression through the production translation loader, and make the existing firework parity fixture use that same loader. The previous fixture loaded the complete language map and missed this bug. ## Vanilla reference Pinned Minecraft 26.3 `Fireworks.addToTooltip`, `Fireworks.addExplosionTooltip`, and `FireworkExplosion.addToTooltip` / `addAdditionalTooltip` (bytecode inspected with javap). `tools/test_firework_tooltip_parity.py` compares the production tooltip path with `VanillaFireworkTooltipOracle`. All 3,000 cases matched in three consecutive runs. Both the updated parity fixture and the new unit regression failed before the fix; the unit regression passes afterward. ## Self-check Run with `RUST_TEST_THREADS=1 CARGO_BUILD_JOBS=3 python3 tools/pr_ready.py --quick --base origin/main`. The initial parallel Rust test run exited with a native SIGSEGV during graphics tests; the complete serial rerun passed. The broad parity suite is listed below; the firework harness was run separately as described above. **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 022600481, 7 min 28 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +67 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 290 passed (22 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ | | tests: horizon-client | ✅ 1109 passed (6 min 54 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 279 affected, to run in CI (--quick): ambient_sound, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo, basic_feature, biome_chunk, biome_generation and 267 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Visual verification Verified in a running creative inventory: a default rocket displays “Firework Rocket” and “Flight Duration: 1”. An in-game screenshot was captured and checked in the task workspace. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:40 +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#3457
No description provided.