fernthedev Posted July 4, 2019 Share Posted July 4, 2019 So I believe you used to be able in 1.12 or pre (I don't really remember) you could add buttons with something as gui.addButton(); or something like that. Is there a replacement for that or should I use reflection? Because as far as I see I don't see any public method for adding buttons. I want to avoid using classes implement other GUIs to fix this due to other mods trying to do the same. I believe a method to add to a list rather than replace the GUI is better since multiple mods can take advantage of it. Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted July 4, 2019 Share Posted July 4, 2019 https://github.com/Cadiboo/NoCubes/blob/7622103b18c6f8114f3d33343d833a0457666ae6/src/main/java/io/github/cadiboo/nocubes/client/ClientEventSubscriber.java#L534-L544 Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
fernthedev Posted July 4, 2019 Author Share Posted July 4, 2019 What about 1.13 though? Is there any equivalent to the code uses above or is getChildren() what I have to use? Quote Link to comment Share on other sites More sharing options...
fernthedev Posted July 4, 2019 Author Share Posted July 4, 2019 Nevermind I'm stupid, didn't realize you were using InitGuiEvent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.