[PR #7887] fire_starter_sound: both fire starters on a campfire, a candle and stone #7881

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

📋 Pull Request Information

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

Base: main ← Head: test/fire-starter-flint


📝 Commits (2)

  • 73a8f22 test: both fire starters on a campfire, a candle and stone
  • 37d4e42 harness: the oracle calls each item's own useOn

📊 Changes

3 files changed (+77 additions, -25 deletions)

View changed files

📝 crates/horizon-client/examples/probe/fire_starter_sound_probe.rs (+9 -5)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFireStarterSoundOracle.java (+52 -11)
📝 tools/test_fire_starter_sound_parity.py (+16 -9)

📄 Description

tools/test_fire_starter_sound_parity.py fed its probe nothing but level random seeds, and the probe asked one branch every time: fire_starter_pitch(true, ...) and fire_starter_sound(true), the fire charge's. The steel branch the game uses (game.rs picks it with item == "fire_charge") never reached a comparison — neither its minecraft:item.flintandsteel.use sound, nor its nextFloat() * 0.4 + 0.8 pitch, nor the single draw that pitch makes. The suite also only ever called the charge's private playSound, so the suite's own admission that useOn's choice was unexercised stayed true.

The corpus now runs both items against three blocks: a campfire and a candle (lit=false) and stone. The oracle calls each item's real useOn through a UseOnContext whose player is a shell with an empty hand, over a stand-in level holding that block, so the sound the level is asked for is the one the item's own branch asks for — the charge's lighting or placing path, the steel's lighting or placing path — with the level random seeded from the case. 20,006 seeds x 2 items x 3 blocks = 120,036 cases.

Proven:

  • python3 tools/test_fire_starter_sound_parity.py: 120,036 rust-fire-starter-sound-parity cases match the pinned client (120,036 output lines).
  • With fire_starter_sound's steel branch returning the charge's minecraft:item.firecharge.use, 60,018 cases differ — every one of the flint-and-steel cases, on all three blocks — and none of the 60,018 fire charge cases differ: vanilla='minecraft:item.flintandsteel.use ...', Rust='minecraft:item.firecharge.use ...' at the first one.
  • The removal was invisible before: the same edit against the previous corpus still reported 20,006 rust-fire-starter-sound-parity cases match the pinned client (20,006 output lines).

Not proven: the block states either item writes, its game events and the item damage are not compared, and the world is a stand-in whose only block is the one under the click; the pitch comparison is exact bits, and the random afterwards shows the same number of draws on both sides.


🔄 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/7887 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/fire-starter-flint` --- ### 📝 Commits (2) - [`73a8f22`](https://github.com/horizon-rust/horizon/commit/73a8f221f9f6faa98bcc8349520e9bb30f5950ef) test: both fire starters on a campfire, a candle and stone - [`37d4e42`](https://github.com/horizon-rust/horizon/commit/37d4e42817c9ff153aa83ca8d8541371f8cc16fb) harness: the oracle calls each item's own useOn ### 📊 Changes **3 files changed** (+77 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/fire_starter_sound_probe.rs` (+9 -5) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFireStarterSoundOracle.java` (+52 -11) 📝 `tools/test_fire_starter_sound_parity.py` (+16 -9) </details> ### 📄 Description `tools/test_fire_starter_sound_parity.py` fed its probe nothing but level random seeds, and the probe asked one branch every time: `fire_starter_pitch(true, ...)` and `fire_starter_sound(true)`, the fire charge's. The steel branch the game uses (`game.rs` picks it with `item == "fire_charge"`) never reached a comparison — neither its `minecraft:item.flintandsteel.use` sound, nor its `nextFloat() * 0.4 + 0.8` pitch, nor the single draw that pitch makes. The suite also only ever called the charge's private `playSound`, so the suite's own admission that `useOn`'s choice was unexercised stayed true. The corpus now runs both items against three blocks: a campfire and a candle (lit=false) and stone. The oracle calls each item's real `useOn` through a `UseOnContext` whose player is a shell with an empty hand, over a stand-in level holding that block, so the sound the level is asked for is the one the item's own branch asks for — the charge's lighting or placing path, the steel's lighting or placing path — with the level random seeded from the case. 20,006 seeds x 2 items x 3 blocks = 120,036 cases. **Proven:** - `python3 tools/test_fire_starter_sound_parity.py`: `120,036 rust-fire-starter-sound-parity cases match the pinned client (120,036 output lines)`. - With `fire_starter_sound`'s steel branch returning the charge's `minecraft:item.firecharge.use`, 60,018 cases differ — every one of the flint-and-steel cases, on all three blocks — and none of the 60,018 fire charge cases differ: `vanilla='minecraft:item.flintandsteel.use ...'`, `Rust='minecraft:item.firecharge.use ...'` at the first one. - The removal was invisible before: the same edit against the previous corpus still reported `20,006 rust-fire-starter-sound-parity cases match the pinned client (20,006 output lines)`. **Not proven:** the block states either item writes, its game events and the item damage are not compared, and the world is a stand-in whose only block is the one under the click; the pitch comparison is exact bits, and the random afterwards shows the same number of draws on both sides. --- <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#7881
No description provided.