Occultism

Occultism

19M Downloads

Same items are not merged correctly in the storage when retrieving items

hyodocraft opened this issue · 2 comments

commented

Describe the bug
When attempting to retrieve item(s) from the storage that contains more than 1024(controllerStackSize) the same items, the item is retrieved from the first matching slot, ignoring fractions.
As a result, less than 1024(controllerStackSize) items are stored across multiple slots.

To Reproduce
Steps to reproduce the behavior:

  1. Place empty Dimensional Storage

  2. Store 1024 and a bit of the same items

  3. Confirm the number of slots used is 2

  4. Remove items so that there are less than 1024 items

  5. There are less than 1024 of the same item, but two slots are occupied.

Expected behavior
When attempting to retrieve item(s) from the storage, the system searches for the same item in the storage, and retrieves the item preferentially from the slot with the smallest stack size among the slots that match.

Screenshots
MC1.18.2-1.35.5 https://streamable.com/3rntv2

System (please complete the following information):

  • Occultism Version: occultism-1.16.5-1.28.0 / occultism-1.18.2-1.35.5
  • OS: Windows 10
  • Minecraft Version: 1.16.5 / 1.18.2
  • Modpack Link and Version, or list of mods: Enigmatica 6 Expert v1.3.0 (1.16.5) / none (1.18.2)

Additional context
none

commented

Interesting observation, funny how it so far escaped notice.
I will look into it when time is available!

commented

Referring to #730, the same applies here (mostly).
The extraction logic mirrors vanilla extraction logic (and partially relies on vanilla code too), which will take the first matching stack.

There is additional functionality for crafting, where the most common item will be taken, but that applies to tag-based crafting recipes and will internally still work the same (meaning, of identical items, it will start with the first stack).

This will also be closed as "wontfix", but again with the option to discuss the urgency of it, and the option of a third party PR to change it, if thoroughly tested.