DaedalusGame / EmbersRekindled

And so it is, that ash seeketh embers. Continuation of Embers, a dwarven magic mod for Minecraft.
MIT License
42 stars 34 forks source link

Fix Item Requisition occasionally deleting items #317

Open JoshieGemFinder opened 8 months ago

JoshieGemFinder commented 8 months ago

canItemStacksStack() will return false if the first stack is empty. This means if you try to insert an unstackable item into a non-smart requisition connected to a full container, it'll:

  1. Shrink that first stack to being empty.
  2. Fail to insert the split stack into the container.
  3. Try to merge the first stack and the split stack.
  4. Get false from canItemStacksStack() because the first stack is empty
  5. Return the empty stack because of the return first, deleting the item you're trying to insert