[PR #7518] [CLOSED] Draw the flame animation over a burning arrow #7640

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7518
Author: @MSedgeMC
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: fix/arrow-flames


📝 Commits (2)

  • fda59af fix: draw the flame animation over a burning arrow
  • 2d5e51c test: pin the flame pass to a burning arrow's interpolated box

📊 Changes

2 files changed (+112 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/fire_render.rs (+89 -1)
📝 crates/horizon-client/src/game.rs (+23 -0)

📄 Description

Vanilla

Entity.displayFireAnimation is isOnFire() && !isSpectator(), and
EntityRenderDispatcher.render draws the fire billboard for every entity that
answers true to it, right after the entity's own renderer submits — the arrow
renderer is no exception.

An arrow's remainingFireTicks come from two places:

  • AbstractArrow.tick calls applyEffectsFromBlocks() and
    applyEffectsFromBlocks(from, to), so a fire block the arrow flew through
    runs BaseFireBlock.entityInside and ignites it for 160 ticks;
  • a Flame bow ignites it as it spawns (igniteForSeconds(100.0f)).

EntityRenderDispatcher.renderFlame scales its billboard by
getBbWidth() * 1.4F and stacks layers up to getBbHeight(), which is what
fire_render::flames already does for mobs, the player, items and stands.

What Horizon got wrong

entity_geometry's flame pass had arms for the mobs, the player's own body,
the dropped items and the armor stands, and none for projectiles — so an arrow
carrying ArrowState.fire_ticks (set by arrows::apply_effects_from_blocks's
Effect::FireIgnite, or by Projectile::set_bonus's Flame) flew visibly not
on fire, while the rest of the simulation treated it as burning
(sulfur_cubes reads on_fire() for tnt_explodes, an arrow on fire lights
campfires and TNT it lands in).

Proven: burning_projectiles in the new unit test: an arrow with no fire
ticks lists nothing, a Flame arrow interpolated halfway between (0, 64, 0) and
(1, 66, 2) lists ([0.5, 65.0, 1.0], 0.5, 0.5) — the flame pass's previous
answer was [] for every projectile (left: [], right: [([0.5, 65.0, 1.0], 0.5, 0.5)]). A mob's thrown trident flies with the same
ArrowState and lists at its 0.5 box; a snowball, which has no fire ticks at
all, never does.

Not proven: not watched in a running game here (no prepared assets), so
the drawn billboard itself is untested; the smoke test is the vertex list the
flame pass now produces.

Fixes #7457


#7466 (merged) made a burning arrow's DATA_SHARED_FLAGS_ID reach every
client; this is the other half it assumed was already there ("the arrow
renderer already draws the flames when the arrow's fire is set"). It was not:
the flame pass in entity_geometry has four arms and none of them is a
projectile, in single player as much as on a LAN client.

Fixes #7457. #7500 (tridents) is only half covered: a mob's thrown trident
flies with ArrowState and is drawn burning from now on, but the player's own
thrown trident (game/trident.rs) keeps no remainingFireTicks at all, which
is a separate gap.


🔄 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/7518 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/arrow-flames` --- ### 📝 Commits (2) - [`fda59af`](https://github.com/horizon-rust/horizon/commit/fda59afb810f7ca3bdb17a49570ec40b495c9841) fix: draw the flame animation over a burning arrow - [`2d5e51c`](https://github.com/horizon-rust/horizon/commit/2d5e51c76d3a06b02fa1e5c2199b4bac0930d90a) test: pin the flame pass to a burning arrow's interpolated box ### 📊 Changes **2 files changed** (+112 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/fire_render.rs` (+89 -1) 📝 `crates/horizon-client/src/game.rs` (+23 -0) </details> ### 📄 Description ## Vanilla `Entity.displayFireAnimation` is `isOnFire() && !isSpectator()`, and `EntityRenderDispatcher.render` draws the fire billboard for every entity that answers true to it, right after the entity's own renderer submits — the arrow renderer is no exception. An arrow's `remainingFireTicks` come from two places: - `AbstractArrow.tick` calls `applyEffectsFromBlocks()` and `applyEffectsFromBlocks(from, to)`, so a fire block the arrow flew through runs `BaseFireBlock.entityInside` and ignites it for 160 ticks; - a Flame bow ignites it as it spawns (`igniteForSeconds(100.0f)`). `EntityRenderDispatcher.renderFlame` scales its billboard by `getBbWidth() * 1.4F` and stacks layers up to `getBbHeight()`, which is what `fire_render::flames` already does for mobs, the player, items and stands. ## What Horizon got wrong `entity_geometry`'s flame pass had arms for the mobs, the player's own body, the dropped items and the armor stands, and none for projectiles — so an arrow carrying `ArrowState.fire_ticks` (set by `arrows::apply_effects_from_blocks`'s `Effect::FireIgnite`, or by `Projectile::set_bonus`'s Flame) flew visibly not on fire, while the rest of the simulation treated it as burning (`sulfur_cubes` reads `on_fire()` for `tnt_explodes`, an arrow on fire lights campfires and TNT it lands in). **Proven:** `burning_projectiles` in the new unit test: an arrow with no fire ticks lists nothing, a Flame arrow interpolated halfway between (0, 64, 0) and (1, 66, 2) lists `([0.5, 65.0, 1.0], 0.5, 0.5)` — the flame pass's previous answer was `[]` for every projectile (`left: []`, `right: [([0.5, 65.0, 1.0], 0.5, 0.5)]`). A mob's thrown trident flies with the same `ArrowState` and lists at its 0.5 box; a snowball, which has no fire ticks at all, never does. **Not proven:** not watched in a running game here (no prepared assets), so the drawn billboard itself is untested; the smoke test is the vertex list the flame pass now produces. Fixes #7457 --- #7466 (merged) made a burning arrow's `DATA_SHARED_FLAGS_ID` reach every client; this is the other half it assumed was already there ("the arrow renderer already draws the flames when the arrow's fire is set"). It was not: the flame pass in `entity_geometry` has four arms and none of them is a projectile, in single player as much as on a LAN client. Fixes #7457. `#7500` (tridents) is only half covered: a mob's thrown trident flies with `ArrowState` and is drawn burning from now on, but the player's own thrown trident (`game/trident.rs`) keeps no `remainingFireTicks` at all, which is a separate gap. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:21:13 +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#7640
No description provided.