Fix Duplication Glitch with ME Storage Hatches/Buses #2646
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.
What
This PR fixes a specific ME Stocking Bus/Hatch duplication glitch, which whilst not as common as the one fixed by #2608, can still be accidentally created.
Issue is as described in #2530. Specifically, it was reproduced as such:
Implementation Details
There are several parts of this PR that could be looked over:
prepareRecipe
, meaning it is not called for every recipe search, just when a recipe is found, and is called before OC and Parallel handling, allowing for the recipe logic to exit with invalid recipes, based on inputs.setupAndConsumeRecipeInputs
instead, but invalid inputs there do not stop the recipe from running.Outcome
Fixes #2530
Additional Information
Setup: (GCYM was not used to reduce variables, and due to incompatibility with GT Master State)
Potential Compatibility Issues
Perhaps may not work with addons that override the
prepareRecipe
function.