[PR #7621] A wither skeleton's arrow leaves the bow burning #7724

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

📋 Pull Request Information

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

Base: main ← Head: feat/wither-skeleton-flame-arrow


📝 Commits (4)

  • a9f53fc feat: a wither skeleton's arrow leaves the bow burning
  • 3925ca9 test: only a wither skeleton's arrow comes out burning
  • f9be49f port_map: WitherSkeleton.getArrow names perform_ranged_attack
  • 806ec22 test: prove the wither skeleton ignite without prepared resources

📊 Changes

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

View changed files

📝 crates/horizon-client/src/mobs/undead.rs (+93 -0)
📝 tools/port_map/game2-004.tsv (+1 -1)

📄 Description

What and why

An arrow shot by a wither skeleton flew cold: it neither burned on the way nor set
alight what it hit. Vanilla ignites it for 100 seconds as it leaves the bow.

Vanilla reference

WitherSkeleton.getArrow(ItemStack, float, ItemStack) (javap -p -c):

0: aload_0
1: aload_1
2: fload_2
3: aload_3
4: invokespecial #138  // Method AbstractSkeleton.getArrow:(...)LAbstractArrow;
7: astore        4
9: aload         4
11: ldc           #142  // float 100.0f
13: invokevirtual #143  // Method AbstractArrow.igniteForSeconds:(F)V
16: aload         4
18: areturn

So the arrow the parent made is ignited for 100 seconds — 2000 fire ticks — and
returned; AbstractArrow.onHitEntity then ignites what it strikes.

Horizon lacked it: mobs/undead.rs::perform_ranged_attack is the one place a
skeleton's bow makes an arrow, and it set the species' tipped effect (stray,
bogged, parched) and the bow's Flame bonus, but nothing ignited the arrow for a
wither skeleton, so ArrowState::fire_ticks stayed 0 and on_fire() false.

Other projects' code

none

Proven:

  • cargo test -q -p horizon-client-lib --lib wither_arrow ->
    running 2 tests ... test result: ok. 2 passed; 0 failed (1462 filtered out).
    only_a_wither_skeletons_arrow_comes_out_burning pins the value the change
    makes: fire_ticks == 2000 for a wither skeleton's arrow, 0 for a plain
    skeleton's, and a Flame arrow already at 4000 ticks keeps them
    (Entity.igniteForTicks only raises the count). Before the change the arrow
    carried fire_ticks == 0 and on_fire() was false for both species.
  • cargo clippy -q -p horizon-client-lib --lib silent, rustfmt --edition 2024 --check clean, and python3 tools/port_ledger.py map-check tools/port_map/game2-004.tsv against a ledger rebuilt with this branch's tree ->
    150 rows, no problems.

Not proven: the second test follows perform_ranged_attack end to end but
skips silently where the prepared .local/horizon-client resources are absent,
which is the case on this machine, so the shooting path itself is left to CI. No
in-game shot either; the arrow's ignition of the entity it hits is the existing
arrows path and is not re-tested here. A wither skeleton only shoots while it
holds a bow, which its own equipment does not give it.


🔄 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/7621 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/wither-skeleton-flame-arrow` --- ### 📝 Commits (4) - [`a9f53fc`](https://github.com/horizon-rust/horizon/commit/a9f53fc757b213afac1d96cdf193559ca01576f2) feat: a wither skeleton's arrow leaves the bow burning - [`3925ca9`](https://github.com/horizon-rust/horizon/commit/3925ca9d22b2b8b6b84a9f7121ce7266201d0a6e) test: only a wither skeleton's arrow comes out burning - [`f9be49f`](https://github.com/horizon-rust/horizon/commit/f9be49f6bd164f62f79b963e5dcc99949d1e953a) port_map: WitherSkeleton.getArrow names perform_ranged_attack - [`806ec22`](https://github.com/horizon-rust/horizon/commit/806ec222867313f5ad12d965f249da584c9978ce) test: prove the wither skeleton ignite without prepared resources ### 📊 Changes **2 files changed** (+94 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/undead.rs` (+93 -0) 📝 `tools/port_map/game2-004.tsv` (+1 -1) </details> ### 📄 Description ## What and why An arrow shot by a wither skeleton flew cold: it neither burned on the way nor set alight what it hit. Vanilla ignites it for 100 seconds as it leaves the bow. ## Vanilla reference `WitherSkeleton.getArrow(ItemStack, float, ItemStack)` (`javap -p -c`): ``` 0: aload_0 1: aload_1 2: fload_2 3: aload_3 4: invokespecial #138 // Method AbstractSkeleton.getArrow:(...)LAbstractArrow; 7: astore 4 9: aload 4 11: ldc #142 // float 100.0f 13: invokevirtual #143 // Method AbstractArrow.igniteForSeconds:(F)V 16: aload 4 18: areturn ``` So the arrow the parent made is ignited for 100 seconds — 2000 fire ticks — and returned; `AbstractArrow.onHitEntity` then ignites what it strikes. Horizon lacked it: `mobs/undead.rs::perform_ranged_attack` is the one place a skeleton's bow makes an arrow, and it set the species' tipped effect (stray, bogged, parched) and the bow's Flame bonus, but nothing ignited the arrow for a wither skeleton, so `ArrowState::fire_ticks` stayed 0 and `on_fire()` false. ## Other projects' code none **Proven:** - `cargo test -q -p horizon-client-lib --lib wither_arrow` -> `running 2 tests ... test result: ok. 2 passed; 0 failed` (1462 filtered out). `only_a_wither_skeletons_arrow_comes_out_burning` pins the value the change makes: `fire_ticks == 2000` for a wither skeleton's arrow, `0` for a plain skeleton's, and a Flame arrow already at 4000 ticks keeps them (`Entity.igniteForTicks` only raises the count). Before the change the arrow carried `fire_ticks == 0` and `on_fire()` was false for both species. - `cargo clippy -q -p horizon-client-lib --lib` silent, `rustfmt --edition 2024 --check` clean, and `python3 tools/port_ledger.py map-check tools/port_map/game2-004.tsv` against a ledger rebuilt with this branch's tree -> `150 rows, no problems.` **Not proven:** the second test follows `perform_ranged_attack` end to end but skips silently where the prepared `.local/horizon-client` resources are absent, which is the case on this machine, so the shooting path itself is left to CI. No in-game shot either; the arrow's ignition of the entity it hits is the existing `arrows` path and is not re-tested here. A wither skeleton only shoots while it holds a bow, which its own equipment does not give it. --- <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#7724
No description provided.