[PR #5253] [MERGED] fix(mobs): a burning arrow lights a sulfur cube's fuse #6166

Closed
opened 2026-11-03 06:15:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5253
Author: @reservedbytes
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/sulfur-cube-burning-arrow


📝 Commits (3)

📊 Changes

3 files changed (+103 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+2 -0)
📝 crates/horizon-client/src/game/sulfur_cubes.rs (+17 -1)
📝 crates/horizon-client/src/mobs/sulfur_cube.rs (+84 -10)

📄 Description

What and why

An explosive sulfur cube with a block lights its fuse as soon as a burning arrow or trident hits it
Horizon lit it only through the fire a burning arrow sets, on the cube's next tick, when the on_fire damage primed it
A burning trident sets no fire here, so it never lit the fuse
A cube in water or rain was put out before the fire could prime it
The late fuse also let the cube take 1 on_fire damage, which a primed cube shrugs off in vanilla
The arrow and trident hits now light the long fuse at the hit when the projectile is on fire and tnt_explodes is on
Vanilla hurts with arrow and trident damage, both in #sulfur_cube_with_block_immune_to
Horizon maps both to DamageKind::Arrow
The priming runs after the hit's hurt, which it does not change, so the cube is still pushed by the arrow as in vanilla
The cube's pending sounds are now flags, so the next tick plays entity.tnt.primed and then the archetype's hit sound, where one used to replace the other
Unit tests check the long fuse, that a second arrow leaves it alone, that a cube without a block or with a block that does not explode is not lit, and the two sounds in order
a_knock_and_a_lit_fuse_both_sound needs the prepared 26.3 data, so CI without .local skips it
Left as is: primeTime's tnt_explodes check for fire and explosion priming is #5084's
Left as is: with tnt_explodes off, the burn path still primes on the next tick until #5084
Left as is: a knock later in the same tick as a lit fuse still drops the fuse sound, since knockback sets its flag with =
#5155 rewrites the lines next to that one

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

SulfurCube.hurtServer calls primeTime(false) for #minecraft:is_fire or a direct entity that is an AbstractArrow on fire (world/entity/monster/cubemob/SulfurCube.java:246-252)
ThrownTrident extends AbstractArrow (world/entity/projectile/arrow/ThrownTrident.java:31)
AbstractArrow.onHitEntity sets the target alight and then hurts it (world/entity/projectile/arrow/AbstractArrow.java:465-470)
ThrownTrident.onHitEntity hurts it without setting it alight (world/entity/projectile/arrow/ThrownTrident.java:131)
SulfurCube.primeTime checks tnt_explodes and plays TNT_PRIMED (world/entity/monster/cubemob/SulfurCube.java:336-352)
SulfurCube.knockback plays the hit sound after the push (world/entity/monster/cubemob/SulfurCube.java:872)

Other projects' code

none

Self-check

Check Result
Scope ✅ 3 files, +103 −11
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (56 s)
rustfmt ✅ (8 s)
clippy ✅ (1 min 58 s)
tests: horizon-client ✅ 1344 passed (5 min 15 s)
doc tests ✅ 0 passed (1 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)

🔄 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/5253 **Author:** [@reservedbytes](https://github.com/reservedbytes) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sulfur-cube-burning-arrow` --- ### 📝 Commits (3) - [`16fd39c`](https://github.com/horizon-rust/horizon/commit/16fd39cbe4573c43573ee6da1d781bba8154c2f7) fix(mobs): a burning arrow lights a sulfur cube's fuse - [`8f38aca`](https://github.com/horizon-rust/horizon/commit/8f38acad124ad7f60f90e2f0468317d0946fa5b5) Merge main into #5253 (main builds again after #5251) - [`5c8560e`](https://github.com/horizon-rust/horizon/commit/5c8560ecbc19966976e8ad83b432533254f751e3) Merge main into #5253 (main's clippy fix 825a6bbcf) ### 📊 Changes **3 files changed** (+103 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+2 -0) 📝 `crates/horizon-client/src/game/sulfur_cubes.rs` (+17 -1) 📝 `crates/horizon-client/src/mobs/sulfur_cube.rs` (+84 -10) </details> ### 📄 Description ## What and why An explosive sulfur cube with a block lights its fuse as soon as a burning arrow or trident hits it Horizon lit it only through the fire a burning arrow sets, on the cube's next tick, when the `on_fire` damage primed it A burning trident sets no fire here, so it never lit the fuse A cube in water or rain was put out before the fire could prime it The late fuse also let the cube take 1 `on_fire` damage, which a primed cube shrugs off in vanilla The arrow and trident hits now light the long fuse at the hit when the projectile is on fire and `tnt_explodes` is on Vanilla hurts with `arrow` and `trident` damage, both in `#sulfur_cube_with_block_immune_to` Horizon maps both to `DamageKind::Arrow` The priming runs after the hit's hurt, which it does not change, so the cube is still pushed by the arrow as in vanilla The cube's pending sounds are now flags, so the next tick plays `entity.tnt.primed` and then the archetype's hit sound, where one used to replace the other Unit tests check the long fuse, that a second arrow leaves it alone, that a cube without a block or with a block that does not explode is not lit, and the two sounds in order `a_knock_and_a_lit_fuse_both_sound` needs the prepared 26.3 data, so CI without `.local` skips it Left as is: `primeTime`'s `tnt_explodes` check for fire and explosion priming is #5084's Left as is: with `tnt_explodes` off, the burn path still primes on the next tick until #5084 Left as is: a knock later in the same tick as a lit fuse still drops the fuse sound, since `knockback` sets its flag with `=` #5155 rewrites the lines next to that one ## 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 `SulfurCube.hurtServer` calls `primeTime(false)` for `#minecraft:is_fire` or a direct entity that is an `AbstractArrow` on fire (`world/entity/monster/cubemob/SulfurCube.java:246-252`) `ThrownTrident` extends `AbstractArrow` (`world/entity/projectile/arrow/ThrownTrident.java:31`) `AbstractArrow.onHitEntity` sets the target alight and then hurts it (`world/entity/projectile/arrow/AbstractArrow.java:465-470`) `ThrownTrident.onHitEntity` hurts it without setting it alight (`world/entity/projectile/arrow/ThrownTrident.java:131`) `SulfurCube.primeTime` checks `tnt_explodes` and plays `TNT_PRIMED` (`world/entity/monster/cubemob/SulfurCube.java:336-352`) `SulfurCube.knockback` plays the hit sound after the push (`world/entity/monster/cubemob/SulfurCube.java:872`) ## Other projects' code none ## Self-check | Check | Result | | --- | --- | | Scope | ✅ 3 files, +103 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (56 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 58 s) | | tests: horizon-client | ✅ 1344 passed (5 min 15 s) | | doc tests | ✅ 0 passed (1 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) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:17 +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#6166
No description provided.