Direwolf20-MC / BuildingGadgets

Sometimes, building large structures can be a little tedious, and take a lot of effort. Not all of us are great builders you know!
https://www.curseforge.com/minecraft/mc-mods/building-gadgets
MIT License
206 stars 65 forks source link

Support for Ender Utilities' Handy Bag #306

Closed valarnin closed 5 years ago

valarnin commented 5 years ago

Ender Utilities has a lovely item called the Handy Bag which acts as a modular extendable bag.

Would it be possible to add support for this bag?

I would assume the following basic logic would work:

MajorTuvok commented 5 years ago

Is there a reason you know about, why they don't expose the ItemHandler cap? (Just curious... I'm pretty sure we can do that (Though it annoys me a bit to add integrations for every mod out there which decises to make up it's own Item System - of course I know there are a few short-comings of the ItemHandler cap, but it's still annoying))

MajorTuvok commented 5 years ago

A note on your propsed way of retrieving it: this way we'd only get the first openable bag... We'd need to get all of them, especially for the copy-paste Gadget. Aka we'll just check for an openable bag whilst iterating over the Inventory ourselves (which is more efficient anyway)

valarnin commented 5 years ago

Is there a reason you know about, why they don't expose the ItemHandler cap?

No clue. Maybe something to do with the way they handle the modules themselves, but I'm not really a mod dev.

we'll just check for an openable bag whilst iterating over the Inventory ourselves

Sounds fine to me. I was just providing an example to make it easier to understand the code required, since I checked their source first to make sure it was possible. Technically you should be able to access all 4 modules for a given handy bag instead of just the active module as well if that were a path you wanted to go down.

Realistically I'd write this myself and submit a PR but I've tried 3 times to get a working dev environment up for MC and failed each time. I can compile the mods but not debug, all attempts to launch MC from a dev environment fail and it's probably something with my setup (Gentoo linux).

hnOsmium0001 commented 5 years ago

If you are using IntelliJ, here is the sequence that worked every time for me (Manjaro)

  1. Open build.gradle using IDEA's import project
  2. Open the Gradle tab, should be on the left tool bar
  3. forgegradle > setupDecompWorksapce, wait
  4. forgegradle > genIntellijRuns, wait
  5. Import (refreshing button on Gradle tab)
  6. Minecraft Client > Edit Configurations > set module to BuildingGadgets.main
MajorTuvok commented 5 years ago

Please open a new issue @P3rf3ctXZer0

MichaelHillcox commented 5 years ago

As we're coming to the final version of 1.12 I'm going to go ahead and close this issue. If the mod in question updates to 1.14 then please reopen the issue.