ItemInvUtil#move fails if the target inventory does not accept the item
shartte opened this issue ยท 0 comments
I am using:
ItemInvUtil.move(extractable, insertable, 1)
If the target insertable does not accept the item, the method crashes because it tries to extract 0 items from extractable, then complains that it gets an empty stack.
Caused by: java.lang.IllegalStateException: Tried to extract the filter (C) from A but it returned an empty item stack after we have already inserted the expected stack into B!
The inventory is now in an invalid (duped) state!