Shadows-of-Fire / Toast-Control

Because Mojang can't into popups.
MIT License
13 stars 6 forks source link

Toastcontrol disables nonvanilla gui buttons #4

Closed mcenderdragon closed 6 years ago

mcenderdragon commented 6 years ago

https://github.com/mcenderdragon/Futurepack-API/issues/456

In Summary: I have added custom buttons to a custom gui of mine and it seems like yor mod sets the "visible" flag of one of them to false. Resseting the visible flag each frame to true fixes the problem.

It took very long to find out this mod is causing the issue :/

Edit: After reading your code I can hardly belive this mod is causing the issue... maybe another one is involved...

Shadows-of-Fire commented 6 years ago

Right. If its one of my mods it would have to be FastWorkbench, toast control doesn't touch gui button code. The checking on fastbench is kinda strict tho.

Shadows-of-Fire commented 6 years ago

https://github.com/Shadows-of-Fire/FastWorkbench/blob/master/src/main/java/shadows/fastbench/proxy/BenchClientProxy.java#L45

Shadows-of-Fire commented 6 years ago

If these checks are not strict enough I guess I get to start checking the texY and texX provided to GuiButtonImage

mcenderdragon commented 6 years ago

My button is futurepack.common.gui.ButtonAspect and extends net.minecraft.client.gui.GuiButton, maybe you can implemented a class check. And also my disbaled button has id 10, so it is probably that.

Shadows-of-Fire commented 6 years ago

If your isnt an instanceof GuiButtonImage and doesn't match either of those relocs this check will fail, so a blacklist at that level wouldn't do anything

mcenderdragon commented 6 years ago

It is not, thats very weird, it seems like the b instanceof GuiButtonImage is ignored and onlyb.id == 10 is used...

Shadows-of-Fire commented 6 years ago

Actually, its probably that stupid af no more recipe book mod.

Shadows-of-Fire commented 6 years ago

As I recall, that mod deletes all buttons in the game with id of 10.

mcenderdragon commented 6 years ago

well yeah that would affect my guis...

Shadows-of-Fire commented 6 years ago

Gonna close this and move back to the futurepack issue

mcenderdragon commented 6 years ago

Sure