SmartInvs icon indicating copy to clipboard operation
SmartInvs copied to clipboard

InventoryOpener's fill method does not work for some inventory types

Open ImDxni opened this issue 4 years ago • 2 comments

Hi, i was trying to do stuffs with SmartInvs, i was using the Dropper InventoryType and i found a problem. In the InventoryOpener interface, the default method fill (that is called by SpecialInventoryOpener) uses this code:

fill method

But this code can be used only for inventories with 9 columns, so inventorytypes like dropper aren't supported by this fill method, if you try to add an item in a dropper it gives error because of the plugin treats the inventory as if it has 9 columns (IndexOutOfBoundsException)

ImDxni avatar Jun 05 '21 14:06 ImDxni

Indeed, it is a problem. I think you can currently workaround this by giving a size of 1 row and 9 columns to the inventory, but this is not very intuitive.

MinusKube avatar Jun 05 '21 16:06 MinusKube

I directly rewrited the fill method

ImDxni avatar Jun 05 '21 19:06 ImDxni