Skip to content

Fixing Issue #8056 Item Stack Limitation #8076

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

Open
wants to merge 2 commits into
base: mc1.21.1/dev
Choose a base branch
from

Conversation

tanayvsoni
Copy link

If the inventory a stock network was trying to access had stacks of any item which could hold more then the original vanilla stack limit for the item, then the stock network would not recognize any item over the item within the stack.

Issue was occurring due to using the vanilla ItemStack class initially to scan the item. I fixed it by figuring out the count of the item before they are added to the InventorySummary and then adding them via one of the existing add functions which will make the ItemStack into a BigItemStack.

To figure out the count I made a duplicate of the target inventory as a ItemStackHandler and then looped over this under the ItemStack had no items remaining. I could not use any built in functions in ItemStack as they were limited to the max stack size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants