BuildingGadgets: Support for Block-Providing Items
Hello there! I’m the Author of Builder’s Bag, a mod (for 1.12.2) which adds a bag that can craft, chisel and do much more with blocks that you provide in its inventory. I’ve been getting requests for integration with BuildingGadgets and so I looked through your code, but I don’t think as it currently stands I have the possibility to add compat on my end.
Ideally, I’d have something like this (from BetterBuildersWands):
https://github.com/portablejim/BetterBuildersWands/blob/1.12/src/main/java/portablejim/bbw/api/IContainerHandler.java
Perhaps it could also have a simulate
boolean, to first check if it has the requiredBlocks before actually using them.
I think an interface like this would generally be useful to have, so that perhaps other backpack mods can integrate their pack, or perhaps the botania wands can work with the gadget.
Please let me know if I need to provide more information. This is my source: https://github.com/Tschipp/BuildersBag
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 35 (11 by maintainers)
This is true, the only other option would be to have a dynamic slot size based on the amount of times you can currently build so when getStackInSlot and getSlots are called you’d allow the mod to currectly make the right comparisons. Simple is always the best way so if you had a list of items you can provide then each item in that list would be repersented by a slot so when getStackInSlot is called you’d just return then lists item based on the index passed. That’s how I’d do it in my head anyway 😄
https://github.com/Direwolf20-MC/BuildingGadgets/blob/d3259bf4e8cbdc449f490141a8eb39e936655f7f/src/main/java/com/direwolf20/buildinggadgets/common/tools/InventoryManipulation.java#L133-L151
To keep things tidy, we now have master list of feature requests, we thank you for your suggestion and we will use this issue for future reference. Closing in preference for https://github.com/Direwolf20-MC/BuildingGadgets/issues/534
Or alternatively, you can try this: The Builder’s Bag supports The rod of the Lands (and all others), so you can place it in the bag and then building gadgets can pull from the bag and indirectly pull from the rod. It’s all quite magical when it happens 😄
I’m working on a tiny PR that adds this kind of interface that would allow this. Botania would have to implement that of course.
That’s really cool to see, it’s a pain in the ass, If you wanted you could make a PR to our mod to add a better interface for other mods to use but all the code is a bit of a mess… Does look like you’re getting somewhere though 👍 Love the mod idea, hopefully in 1.15/1.16 (rewrite) I’m going to make the inventory system completely API ready so I can just give modders the ability to register their own IInventory like solutions. But that’s not any time soon sadly. I am 100% open to Pr’s though 😄