Fix Voiding Input Resources Bug & fix some Repeating Code #6
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.
Description
Making this Pull Request to Fix a Very annoying Bug.
The bug in question is when a Machine Block, for Example the Cobble Press,
Gets Enough input items for a Recipe But does not have enough room in the Output slots to hold all of those Items
It will consume all of the Input items and put as many as it can into the Output Slots, Effectively voiding the input items that are used on the Outputted items that weren't able to be Fit.
As a Summary:
Cobble Press has 1 Stack and 63 Double Compressed Cobblestone in It's Output Slots
You input 1 Stack of Single Compressed Cobble
It Gets used and the Output now is 2 Stacks of Double Compressed Cobblestone
Code Changes
I made 2 new methods
1 will calculate the free space in Slots provided
the Other just Reduces Repeated Code
Related Issues
Checklist
Nullable
orNonnull
annotations to my methods