Posted April 16, 20214 yr As already stated in the title, I would like to know if there is an easy way to combine ItemStacks? My problem at the moment is that I have a list with ItemStacks and want to combine them, which means if the list contains 10 times of stone with a count of 10. form that I want to make a list with 2 times of stone from it which means the count of the items in total are the same so i have two stack with the count 64 and 36. is this possible/ is there a simple way to do that?
April 16, 20214 yr there isn't a function that does that already. however writing your own helper function shouldn't be that hard don't forget to handle the case when the ItemStacks contain different Items, or Items with non-64 maximum stack sizes
April 16, 20214 yr Author 1 hour ago, kiou.23 said: there isn't a function that does that already. however writing your own helper function shouldn't be that hard don't forget to handle the case when the ItemStacks contain different Items, or Items with non-64 maximum stack sizes 38 minutes ago, diesieben07 said: Look at ItemStackHandler#insertItem for an example of how to do this. thanks for the good ideas
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.