Slimefun

Slimefun

3M Downloads

ChestTerminal causes IllegalArgumentException when there are empty slots in front of slots with requested items

martinbrom opened this issue · 1 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

Due to the way ChestTerminal storage works a recent change to ItemStackWrapper uncovered a problem. Since the AccessTerminal looks for requested items in all slots of every inventory on the terminal channel, a newly added validation in the ItemStackWrapper constructor fails if an empty slot is found before the items requested.

📑 Reproduction Steps

  1. Create a basic ChestTerminal setup - access terminal, cargo manager, and one chest with input and output nodes set to the terminal channel.
  2. Insert a stack of any item into the chest's SECOND slot (keep the first slot empty)
  3. Try to request the inserted item from the access terminal
  4. IllegalArgumentException - see logs

💡 Expected Behavior

Items are delivered to the access terminal

📷 Screenshots / Videos

https://youtu.be/QrPyL12PTzk

📜 Server Log

https://pastebin.com/idkTbehi

📂 /error-reports/ folder

Nothing, the exception is caught and logged properly

💻 Server Software

Paper

🎮 Minecraft Version

1.16.x

⭐ Slimefun version

DEV 927

🧭 Other plugins

ChestTerminal 43

commented

Ignore the commit above, I typed an incorrect issue id when pushing something else :)