Repository navigation
Show the ingredients taken from storage in crafting plan previews - #234
Open
rubensworks wants to merge 1 commit into
Open
rubensworks wants to merge 1 commit into
rubensworks wants to merge 1 commit into
Conversation
Since the update to the new crafting storage of Integrated Crafting, previews read the buffer of each crafting job, which is only filled once the job is started. So previews never showed any ingredients that would be taken from storage. They now show the ingredients that the job will take from storage instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #233.
Since 3585071 ("Update to new crafting storage in Integrated Crafting"), previews build their plan from
CraftingJob#getIngredientsStorageBuffer(). Integrated Crafting only fills that buffer once a job is scheduled, so it is always empty in a preview, and previews never showed any ingredient taken from storage, in any view. For example, a preview of 4 furnace minecarts showed neither the cobblestone for the furnaces nor the raw iron for the ingots.Previews now use
CraftingJob#getIngredientsStorage(), which holds the ingredients the job will take from storage, with its amount already taken into account. The plans of running jobs still use the buffer, as before.Testing:
testCraftingPlanPreviewShowsStorageIngredients: calculates the preview of a chest crafted from logs, and checks that the planks job takes the 2 logs from storage and the chest job takes nothing. It fails without the fix ("Expected Storage ingredients of the planks job to be 1, but was 0")../gradlew buildand all 83 game tests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y
Generated by Claude Code