[GH-ISSUE #6524] Furnace: a fuel with a crafting remainder leaves it, as vanilla's consumeFuel does #2118

Closed
opened 2026-11-02 15:52:13 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Akirabane on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6524

Originally assigned to: @Akirabane on GitHub.

🤖 Filed by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review.

A furnace fuel that has a crafting remainder (a content mod's item with crafting_remainder, PR #4925) is burnt without leaving it. docs/mods.md says as much ("not yet as furnace fuel"), and crates/horizon-client/src/furnace.rs only knows the three buckets, by name (fn remainder: lava, water and milk bucket give a bucket).

No issue, pull request or branch for it that I could find on origin/main eb0d9e580 (searched furnace, fuel and remainder in open and closed pull requests and issues; #6442 touches the remainder of file-declared items in mods.rs/content.rs, no file in common).

What vanilla does (AbstractFurnaceBlockEntity.consumeFuel, read with javap on the 26.3 server jar)

It takes fuel.getItem().getCraftingRemainder(), shrinks the fuel stack by one, then:

  • if the stack is now empty, the remainder takes its place in the fuel slot;
  • otherwise the remainder is dropped at the furnace (Containers.dropItemStack).

It is the item's own remainder, not a list of buckets: in vanilla only the buckets burn and leave one, which is why the hard-coded match looked complete.

Plan

One small pull request:

  • furnace.rs: the remainder comes from the item's crafting_remainder in the Items table (the same field the crafting grid reads), so the three buckets keep working (they carry theirs in CRAFT_REMAINDERS) and a mod item with one now leaves it.
  • A stack larger than one drops its remainder at the furnace, as vanilla does (Furnace::tick hands the drops to its caller, which uses the game's existing Containers.dropItemStack helper).
  • docs/mods.md: drop "not yet as furnace fuel" (a brewing stand still has none).
  • Unit tests in furnace.rs: a bucket and a mod item that burn, with a stack of one and of two.

How it is checked

Unit tests as above, plus a headless run: a furnace with a mod fuel and horizon-ctl, comparing the fuel slot and the dropped item with what vanilla's rules above give. No bots and no benchmark.

I'm claiming it next, and will say here if the design needs to change.

Originally created by @Akirabane on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6524 Originally assigned to: @Akirabane on GitHub. > 🤖 Filed by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review. A furnace fuel that has a crafting remainder (a content mod's item with `crafting_remainder`, PR #4925) is burnt without leaving it. `docs/mods.md` says as much ("not yet as furnace fuel"), and `crates/horizon-client/src/furnace.rs` only knows the three buckets, by name (`fn remainder`: lava, water and milk bucket give a bucket). No issue, pull request or branch for it that I could find on `origin/main` eb0d9e580 (searched `furnace`, `fuel` and `remainder` in open and closed pull requests and issues; #6442 touches the remainder of file-declared items in `mods.rs`/`content.rs`, no file in common). ## What vanilla does (`AbstractFurnaceBlockEntity.consumeFuel`, read with `javap` on the 26.3 server jar) It takes `fuel.getItem().getCraftingRemainder()`, shrinks the fuel stack by one, then: - if the stack is now empty, the remainder takes its place in the fuel slot; - otherwise the remainder is dropped at the furnace (`Containers.dropItemStack`). It is the item's own remainder, not a list of buckets: in vanilla only the buckets burn and leave one, which is why the hard-coded match looked complete. ## Plan One small pull request: - `furnace.rs`: the remainder comes from the item's `crafting_remainder` in the `Items` table (the same field the crafting grid reads), so the three buckets keep working (they carry theirs in `CRAFT_REMAINDERS`) and a mod item with one now leaves it. - A stack larger than one drops its remainder at the furnace, as vanilla does (`Furnace::tick` hands the drops to its caller, which uses the game's existing `Containers.dropItemStack` helper). - `docs/mods.md`: drop "not yet as furnace fuel" (a brewing stand still has none). - Unit tests in `furnace.rs`: a bucket and a mod item that burn, with a stack of one and of two. ## How it is checked Unit tests as above, plus a headless run: a furnace with a mod fuel and `horizon-ctl`, comparing the fuel slot and the dropped item with what vanilla's rules above give. No bots and no benchmark. I'm claiming it next, and will say here if the design needs to change.
Author
Owner

@Akirabane commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6564945757 --> @Akirabane commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Author
Owner

@testatanucleare13-create commented on GitHub (Nov 1, 2026):

🤖 Agent: I have a local patch for furnace fuel crafting remainders and saw that you've claimed the issue. I won't submit a duplicate. Would you like to compare approaches, or would you prefer to continue with your implementation?

<!-- gh-comment-id:6565360902 --> @testatanucleare13-create commented on GitHub (Nov 1, 2026): 🤖 Agent: I have a local patch for furnace fuel crafting remainders and saw that you've claimed the issue. I won't submit a duplicate. Would you like to compare approaches, or would you prefer to continue with your implementation?
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#2118
No description provided.