auto workbench anti-jamming patch #7
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.
The auto workbench will now track how many unique ingredients are not present and will keep input slots reserved for them.
Takes a conservative approach that should work with almost all recipes, but is minimalistic to avoid causing too much lag or otherwise being annoying to players who don't expect this behavior.
(one known edge case: a recipe that uses many of one ingredient that does not stack, might still jam, because my code does not check maximum stack sizes and will only reserve 1 slot. I do not know of such recipes)
I did this because my number 1 issue with using the "auto" crafting table in actual automation was that if I couldn't supply all ingredients at the same rate, it would get swamped with one ingredient and need manual intervention. I am now happily mass-producing railcraft wooden ties headache-free.