Storage Drawers: Forestry Pack

Storage Drawers: Forestry Pack

6M Downloads

[Question] Read amount of Items

KidsDontPlay opened this issue ยท 2 comments

commented

Hi,
I created a mod with a block that reads the items in attached invenories (similiar to AE Storage Bus).
But with Storage Drawers or Controller the amount of items is max. 64. How can I get the correct number?
For regular inventories I use

for (int i : ((ISidedInventory) inv).getSlotsForFace(face)) { if (inv.getStackInSlot(i) != null && ((ISidedInventory) inv).canExtractItem(i, inv.getStackInSlot(i), face)) { //do stuff } }

commented

You'll need to use the interfaces in https://github.com/jaquadro/StorageDrawers/tree/master/src/com/jaquadro/minecraft/storagedrawers/api, specifically IDrawerGroup and IDrawer. You can look at some of the integrations like Waila and AE2 for reference (https://github.com/jaquadro/StorageDrawers/tree/master/src/com/jaquadro/minecraft/storagedrawers/integration).

commented

thanks, it works