Posted November 4, 20231 yr Hey everyone, I want to do create a custom gui and when a player pressed a button that GUI will show up. How can I do that ? Is there a document or guide ? I created key bindings.
November 5, 20231 yr 7 hours ago, gbln00 said: Hey everyone, I want to do create a custom gui and when a player pressed a button that GUI will show up. How can I do that ? Is there a document or guide ? I created key bindings. Hi gbln00, welcome to the forums! Some of the best resources for modding are the forge documentation and vanilla classes. From the documentation, I would start at menus and then look at screens below that: https://docs.minecraftforge.net/en/1.19.x/gui/menus/ Also: https://docs.minecraftforge.net/en/1.19.x/misc/keymappings/ Since you're using keymappings, it sounds like the custom GUI you want is related to some type of settings menu. In that case, I would start by looking at a vanilla class such as OptionsScreen.class, found (in 1.20.1): net.minecraft.client.gui.screens The easiest way to navigate here is to type OptionsScreen somewhere in your mod, import it, and then middle click it. Hope that helps. Edited November 5, 20231 yr by urbanxx001
November 5, 20231 yr Author 10 hours ago, urbanxx001 said: Hi gbln00, welcome to the forums! Some of the best resources for modding are the forge documentation and vanilla classes. From the documentation, I would start at menus and then look at screens below that: https://docs.minecraftforge.net/en/1.19.x/gui/menus/ Also: https://docs.minecraftforge.net/en/1.19.x/misc/keymappings/ Since you're using keymappings, it sounds like the custom GUI you want is related to some type of settings menu. In that case, I would start by looking at a vanilla class such as OptionsScreen.class, found (in 1.20.1): net.minecraft.client.gui.screens The easiest way to navigate here is to type OptionsScreen somewhere in your mod, import it, and then middle click it. Hope that helps. Thank you for your help! I will look at it.
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.