Skip to content

Fixing Issue #8056 Item Stack Limitation#8076

Closed
tanayvsoni wants to merge 2 commits into
Creators-of-Create:mc1.21.1/devfrom
tanayvsoni:mc1.21.1/dev
Closed

Fixing Issue #8056 Item Stack Limitation#8076
tanayvsoni wants to merge 2 commits into
Creators-of-Create:mc1.21.1/devfrom
tanayvsoni:mc1.21.1/dev

Conversation

@tanayvsoni

Copy link
Copy Markdown

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.

@IThundxr

Copy link
Copy Markdown
Member

Thanks, I've implemented a alternative fix

@IThundxr IThundxr closed this May 17, 2025
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.

3 participants