Inventory Button Clash with Galacticraft
mallrat208 opened this issue ยท 16 comments
Both Galacticraft and TechGuns2 add a tab to the Players Inventory to allow accessing their respective custom inventory tab. The problem stems from the fact that both mods try to put their buttons at the same location.
https://puu.sh/zhH4A/d05a995c25.png
While you can still click on each individual button if you bias a little to the left or right, it still ends up being a bit hard to tell what you're actually clicking on.
Waiting for MinecraftForge/MinecraftForge#4654 to be merged.
Seeing as it could be a while before that PR actually gets merged, would you be open to using the TabRegistry system that Galacticraft does for now if someone submitted a PR? It's used by Galacticraft, CustomNPCs, and More Player Models currently.
It's pretty easy to setup all things considered, I was able to get a version running locally without any difficulty
In 1.7 the tab api was provided by tinkers construct and both mods used it. In 1.12 this api is gone. Techguns jumped directly to 1.12 and there was no API so I just made my own buttons also knowing there was a PR to forge to add tabs and planning to move to that when it merged. Galacticraft was not 1.12 at that time.
Since the forge PR might still take some time I would support the API in 1.12 but I currently don't have much time so it might take a while.
In 1.12 this api is gone.
@pWn3d1337 in 1.10.2 and later, Galacticraft took over from TConstruct maintaining the tabs API, because TConstruct abandoned it. TConstruct devs were happy with us taking it over. Even since 1.7.10 we were maintaining the code (if you look at TConstruct historic API code in 1.7.10, you will see most of the later contributions to it were actually coded by me.)
The major mods currently using the tabs API are: Galacticraft + CustomNPCs + More Player Models.
Since the forge PR might still take some time I would support the API in 1.12 but I currently don't have much time so it might take a while.
You're very welcome to and I'd encourage that, as it would fix the compatibility issues with all the above 3 mods.
@mallrat208's PR looks good to me - is there a reason for not accepting the PR? If you need more help using the tabs API you are welcome to ask me. Discussion in this thread is fine for me, or you can extract my personal email address from any of my recent Github commits... Or we can use Discord but we might not be in the same time zone!
@mallrat208 I thank you if you could explain how to correct the error in your configuration, at least as a temporary solution. I do not know how to program in java, so I would appreciate it if you could upload the correction file or the patch to correct it.
@Sakhyo Sorry, Techguns license doesn't allow for that. Best bet is to wait for an update.
@pWn3d1337 we are still getting very confused players who cannot access their Galacticraft inventory slots because your mod is covering them up. I think that all you have to do here is accept mallrat208's PR. Earlier versions of your mod were compatible with the Tabs API when it was in TConstruct, so surely you don't have any objection to preserving compatibility with the exact same code in a different package?
i just added these 2 mods into a custom pack. and i am able to access both tabs. that being said. i can see both points of this tho. but in simpleton terms why would it not be simple just to add a config for moving tab x spaces to the right on either side GC or TG instead of this push to just use GC api.. out of all the mods out there im sure not all them will use GC api specially if GC is not part of the pack. @radfast not trying to be mean but the tone of words come off with a bad flavor to me and not sure if anyone else would feel that way. yes be good to get on same page with things but not everyone is willing to work like that. its just reality. but i wouldnt mind seeing a fix to this in 1 form or another.
radfast is right. The reason why no fix is happening is because I did not work on Techguns at all for some month. Maybe I can get back to it in summer. When forge merges the tabs I will use them but this will take forever because forge ... . The reason Techguns did create own tabs is because at the time it was first ported to 1.12 galacticraft was not out yet for 1.12 and the tabs API from tinkers construct was dropped. I also hoped the tab system from forge would get merged soon.
When I get back into modding MC this is one of the first things that will be fixed.
@pyscho974 you have not understood. What you are calling the "GC api" is the same "Tabs API" from TConstruct that this mod and other mods have used for years for inter-mod compatibility. The old TConstruct compatible code was still in TechGuns code, only commented out. All that's happened is we moved it to GC API to maintain it now that TConstruct is not maintaining it. Every mod using it before brought in the part of the TConstruct API which they used, with no problem - they could use it even without Tinker's Construct in the modpack. The same can be done now using this part of GC API. It really is not much more than a name change TConstruct -> GC.
In addition, Mallrat already did all the necessary work, so that all @pWn3d1337 has to do is click 'Merge' on Mallrat's pull request.
I think what's happening here is that pWn3d1337 is busy with other things, that's all.
I do not mean to give a bad tone, but I get annoyed when players complain to our mod that we are making a conflict, when we are using the Tabs API the same way it's always been used, and we have made the effort to maintain the code up to date and keep it available for everybody.
i understand its just a name change from tconstruct to GC... but from what i read it sounded like its possibly going to become part of forge. wouldnt that somewhat break your code if forge adopted their own version? almost sounded like he was just waiting on forge to adopt it instead of using whats in GC currently. but will see if anything happens in the weeks to come. nothing else to do. tho since conflict with mjr i been reluctant to even use GC. but thats something totally different.
tho since conflict with mjr i been reluctant to even use GC
MJRLegends has no connection with the Galacticraft team, he is one guy making an add on called Extra Planets (and some others). You don't have to play his add ons, they are not officially part of the mod. Galacticraft is a full, detailed, balanced and polished mod without add ons. If you want add ons for Galacticraft there are some alternatives, especially there's an interesting new one based on SpaceX and the Falcon 9 rocket.
from what i read it sounded like its possibly going to become part of forge
Nobody knows if or when something like this will become part of Forge. A couple of mod coders have proposed a hugely complicated addition to Forge which other mod coders don't like (including, importantly, mezz the developer of JEI, though he might have changed his opinion I don't know). My guess is that nothing like this will be changed in Forge before the Minecraft 1.13 version at least.
In the interim, for version 2.01.1 of Techguns, I've got a small helper mod I made that will allow Galacticraft and Techguns to work together. It also strips the empty NBTTagCompounds off of drops allowing the items to stack properly with other items.
You can download the initial release and browse the source at https://github.com/mallrat208/TG2Helper/releases