jaquadro / StorageDrawers

A mod adding compartmental storage for Minecraft Forge
MIT License
198 stars 156 forks source link

Add AE2 support. #139

Open ruifung opened 9 years ago

ruifung commented 9 years ago

Personally I think compatibility for something like the issue discussed in https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/1868 should be done in this mod.

I'm thinking that because of the special inventories of the storage drawers, it should implement the https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/src/api/java/appeng/api/storage/IExternalStorageHandler.java interface in order for AE to access it without being affected by the fake items?

jaquadro commented 9 years ago

StorageDrawers does implement that interface -- you'd only ever see 64 items otherwise. The "fake" items are an intentional design decision, and I've left some more information in the related issue.

batuozdemir commented 9 years ago

I love how it works with AE2, but it seems dangerous if all interfaces can access all the items in the drawer, maybe you can make a whitelist, and unwhitelisted items can see the drawer like 3 blocks 4 ingots 8 nuggets.

jaquadro commented 9 years ago

It's not unique to AE2. Anything that looks at an IInventory can see the "max" of all the slots, and if they do something like "use" all the items by just doing a soft read, ship off some results, and then go back and actually "extract" them, then there's going to be a failure. It's not something I'm seeing happen in practice.

Other systems, like the Automagy Inventarium are also embracing the "all possibilities" approach to displaying items, and that was after the author asked me about it.