BottomlessItemHandler
reports itself as having 0 slots
#1036
Labels
type: bug
Issue where something isn't working
BottomlessItemHandler
reports itself as having 0 slots
#1036
Describe the Bug
BottomlessItemHandler
declares itself as aItemStackHandler
with 0 slots, and then overrides various methods to pretend to have one slot. However, this implementation is incomplete, which means several methods inSlottedStorage
/SingleSlotStorage
do not behave as expected:getSlotCount
returns 0.getSlots
returns an empty listgetSlot(0)
throws an out-of-bounds exception, rather than returning the singleton slot.Reproduction Steps
This doesn't affect most mods, but is an issue with something like ComputerCraft/CC: Tweaked, which uses the
SlottedStorage
interface rather thanStorage.extract
/Storage.insert
.lua
) and get the size of the crate (peripheral.find("inventory").size()
). This will print 0.Expected Result
Creative crates would act as an inventory with a single slot.
Screenshots and Videos
No response
Crash Report or Log
No response
Operating System
Linux
Mod Version
0.5.1d
Minecraft Version
1.20.1
Other Mods
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: