[GH-ISSUE #1732] The furnace does not grant experience when collecting cooked food or when broken #523

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

Originally created by @ludovic111 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1732

What I did: I placed food in the furnace to cook.
What happened: When I collected the cooked food, I did not receive any experience, and I also did not get any experience when I broke the furnace.
What I expected: To receive experience when collecting items from the furnace.

Horizon version: 0.2.50
OS, CPU, GPU: Windows x64, 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50 GHz, Intel(R) Iris(R) Xe Graphics (128 MB)

Reported on Discord by Bragim in #horizon-bugs · Discord thread
Tags: gameplay

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1732 > What I did: I placed food in the furnace to cook. > What happened: When I collected the cooked food, I did not receive any experience, and I also did not get any experience when I broke the furnace. > What I expected: To receive experience when collecting items from the furnace. > > Horizon version: 0.2.50 > OS, CPU, GPU: Windows x64, 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50 GHz, Intel(R) Iris(R) Xe Graphics (128 MB) Reported on Discord by **Bragim** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1563764600942370836) Tags: gameplay <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:39:45 +07:00
Author
Owner

@Domanffe commented on GitHub (Oct 25, 2026):

🤖 Agent: where the experience goes missing, with the exact places.

The recipe data already has the number. crafting.rs:1094 parses experience: f32 for every cooking recipe, and containers.rs uses the same recipe for the cooking time:

self.cooking_total = total_time(recipe.time, self.speed);

Nothing reads recipe.experience anywhere in the crate. A finished smelt in containers.rs (the tick around line 514) writes the result into the output slot and never records how much experience that smelt was worth, so there is nothing to hand over when the player takes the stack, and the furnace menu has no take-out hook that awards anything.

Vanilla keeps it in the block entity, not in the player: AbstractFurnaceBlockEntity has a recipesUsed map of recipe id to count, bumped each time a craft completes, saved as the RecipesUsed compound tag (recipe id to count). FurnaceResultSlot.checkTakeAchievements then calls awardUsedRecipesAndPopExperience, which turns the whole map into orbs and clears it. Storing counts rather than a running total matters on load: the recipe id is what the game resolves the experience value from.

So the shape of the fix is three steps, and two of them have a home already:

  • keep the counts on Furnace (a HashMap<String, u32> keyed by recipe.id) and bump them where the result is written into the output slot, saving them as RecipesUsed next to cooking_time_spent in block_entity_nbt.rs:366;
  • award on take-out in the menu path (menu.rs, the same place quick_move lives) and clear the map;
  • spawn the orbs. ExperienceOrb and its NBT already exist in entities.rs:375 and entity_nbt.rs:1021, including the split rule ExperienceOrb.getExperienceValue for values above 247, so this is wiring rather than new logic.

One caveat from reading the field: experience is a float per recipe, vanilla floors the total before splitting, so a hopper-fed furnace that smelted 40 items of 0.35 does not pay for 14 items of one.

<!-- gh-comment-id:6393682712 --> @Domanffe commented on GitHub (Oct 25, 2026): 🤖 Agent: where the experience goes missing, with the exact places. The recipe data already has the number. `crafting.rs:1094` parses `experience: f32` for every cooking recipe, and `containers.rs` uses the same recipe for the cooking time: ```rust self.cooking_total = total_time(recipe.time, self.speed); ``` Nothing reads `recipe.experience` anywhere in the crate. A finished smelt in `containers.rs` (the tick around line 514) writes the result into the output slot and never records how much experience that smelt was worth, so there is nothing to hand over when the player takes the stack, and the furnace menu has no take-out hook that awards anything. Vanilla keeps it in the block entity, not in the player: `AbstractFurnaceBlockEntity` has a `recipesUsed` map of recipe id to count, bumped each time a craft completes, saved as the `RecipesUsed` compound tag (recipe id to count). `FurnaceResultSlot.checkTakeAchievements` then calls `awardUsedRecipesAndPopExperience`, which turns the whole map into orbs and clears it. Storing counts rather than a running total matters on load: the recipe id is what the game resolves the `experience` value from. So the shape of the fix is three steps, and two of them have a home already: - keep the counts on `Furnace` (a `HashMap<String, u32>` keyed by `recipe.id`) and bump them where the result is written into the output slot, saving them as `RecipesUsed` next to `cooking_time_spent` in `block_entity_nbt.rs:366`; - award on take-out in the menu path (`menu.rs`, the same place `quick_move` lives) and clear the map; - spawn the orbs. `ExperienceOrb` and its NBT already exist in `entities.rs:375` and `entity_nbt.rs:1021`, including the split rule `ExperienceOrb.getExperienceValue` for values above 247, so this is wiring rather than new logic. One caveat from reading the field: experience is a float per recipe, vanilla floors the total before splitting, so a hopper-fed furnace that smelted 40 items of 0.35 does not pay for 14 items of one.
Author
Owner

@Domanffe commented on GitHub (Oct 25, 2026):

🤖 Agent: claimed for a fix in #1856.

The furnace never kept a counter: RecipesUsed was written as an empty compound and read nowhere, so FurnaceResultSlot.checkTakeAchievements had nothing to pay on a take and playerDestroy had nothing to pay on a break. #1856 keeps the per-recipe count in Furnace::recipes_used (crates/horizon-client/src/containers.rs), pays it through Game::take_furnace_experience in game.rs, and drops it as orbs when the block is broken. Each recipe is floored on its own, as AbstractFurnaceBlockEntity.createExperience does.

<!-- gh-comment-id:6399549379 --> @Domanffe commented on GitHub (Oct 25, 2026): 🤖 Agent: claimed for a fix in #1856. The furnace never kept a counter: `RecipesUsed` was written as an empty compound and read nowhere, so `FurnaceResultSlot.checkTakeAchievements` had nothing to pay on a take and `playerDestroy` had nothing to pay on a break. #1856 keeps the per-recipe count in `Furnace::recipes_used` (`crates/horizon-client/src/containers.rs`), pays it through `Game::take_furnace_experience` in `game.rs`, and drops it as orbs when the block is broken. Each recipe is floored on its own, as `AbstractFurnaceBlockEntity.createExperience` does.
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#523
No description provided.