Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Voiding Input Resources Bug & fix some Repeating Code #6

Closed
wants to merge 5 commits into from
Closed

Fix Voiding Input Resources Bug & fix some Repeating Code #6

wants to merge 5 commits into from

Conversation

JustAHuman-xD
Copy link

@JustAHuman-xD JustAHuman-xD commented Aug 22, 2022

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

  • I have also tested the proposed changes with an addon.
  • I followed the existing code standards and didn't mess up the formatting.
  • I have added Nullable or Nonnull annotations to my methods
  • I have added sufficient Unit Tests to cover my code.
  • I updated the version in pom.xml according to semantic versioning.

@lithiumjs
Copy link

This one actually fixes Mooy1/InfinityExpansion#103. Now we just need it to be merged...

@GallowsDove
Copy link

Does this work properly with stuff that doesn't stack up to 64, such as ender pearls?

lithiumjs and others added 3 commits December 28, 2022 19:06
this will fix additional miscalculation in case an item that stacks to less than 64 overflows its initial stack.
@JustAHuman-xD
Copy link
Author

Thank you for that fix, just saw the new comments and was about to make the changes but saw you did already.

@Boomer-1
Copy link

Boomer-1 commented Feb 1, 2023

Sefi, if this is good to go can the PR be accepted?

@JustAHuman-xD
Copy link
Author

Doing some local refactoring, going to close this an re-open a new one with the same changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants