/dank/null

/dank/null

31M Downloads

Integration with a drawer controller

nightshard opened this issue ยท 5 comments

commented

I've noticed that the /dank/null is integrated with a building wand and building gadgets, but is it possible to add an integration with a drawer controller, meaning doible clicking the controller will pull items from the dank as well and not only the inventory, not even sure if it's something you need to do or the author of storage drawers.

commented

+1 this would be a life saver, every mining trip I need to manually empty the whole contain of my dank null, its getting a little annoying, wonder if docking station would solve my problem or I would waste my time creating it.

commented

Dam that would be a nightmare to code as it would need the drawer controller to see the dank null as player inventory. Lol could you imagine the tps lag the would happen when a person comes back from mining with the emerald dank null and double clicks on the drawer controller you could be talking 54 stacks with stack size from 1 all the way up to max stack size of 2 billion

commented

No it wouldn't - that's the entire point of APIs. Maybe SD could offer an event, or maybe DN could implement a special interface, so that the mods talk to each other. Building wands probably do it the same way. 54 stacks isn't that much, computationally. Each one has an item (with metadata and NBT if applicable) and a quantity. All that would be needed is for the controller to ask "how many items are in this stack?", cap that number to its own capacity for the item in question, say "I'm taking this many items out of this stack", and the null to subtract that from its internal quantity. If the quantity hits 0, empty the stack like any other time it runs out of something. It's exactly the same approach as used with the player's inventory, except applied to a different inventory, that's all.

commented

First of all, seconded - this would be useful. More importantly, @mcdodge34 if you use a rapid item transport mechanic (thermal's itemducts (preferably impulse) with a high-tier servo (I'm using reinforced so far, but signalum/enderium would be better) to do the extraction) then it's absolutely worth it. You can slap the dank null into the dock, go do things like crafting or restocking food, sleep for the night, all of that stuff... and then your dank null's been emptied out and you're good to go.

commented

This would be on storage drawers to implement either a tag to mark inventory as compatible or their own capability the item stack should implement. As I don't think either exist going to close this. If it does reopen.