Posted February 15, 20223 yr Hello! I am a pretty new modder so I am not too familiar with how this works at all so I am learning as I go. Right now I am trying to create an item that opens a custom GUI/menu when I right click it. Right now I have the item and the sprite, I know how to do the use command to detect if I am right clicking in game. All I need to do is create the GUI/Menu, I have been looking for help for a couple of days now and I just am not understanding what I should be doing. Any help would be appreciated. Edited February 15, 20223 yr by ThatGuyWasMe Typo
February 15, 20223 yr 8 hours ago, ThatGuyWasMe said: Hello! I am a pretty new modder so I am not too familiar with how this works at all so I am learning as I go. Right now I am trying to create an item that opens a custom GUI/menu when I right click it. Right now I have the item and the sprite, I know how to do the use command to detect if I am right clicking in game. All I need to do is create the GUI/Menu, I have been looking for help for a couple of days now and I just am not understanding what I should be doing. Any help would be appreciated. You need to extend the Screen class (see PauseScreen for example). Override the rendering method to add your extra things. You can also call the addRenderableWidget method to add controls (buttons, for example). Then see how e.g books do it to open the screen. You can also use the Minecraft#setScreen method if you want to display the screen using something else.
February 15, 20223 yr Author Other type of interaction, the player inventory shouldn't show up. If you have ever played D&D, the end goal is basically a character sheet, so the player can input their stats and such.
February 16, 20223 yr Author 18 hours ago, matthew123 said: You need to extend the Screen class (see PauseScreen for example). Override the rendering method to add your extra things. You can also call the addRenderableWidget method to add controls (buttons, for example). Then see how e.g books do it to open the screen. You can also use the Minecraft#setScreen method if you want to display the screen using something else. When you are referring to looking at things for examples (PauseScreen and books), how would I go about doing that? I am using Eclipse for the modding.
February 16, 20223 yr 6 hours ago, ThatGuyWasMe said: When you are referring to looking at things for examples (PauseScreen and books), how would I go about doing that? I am using Eclipse for the modding. Navigate to the definition of the screen class. Also, Eclipse is not a good IDE, use IDEA Community Edition. With IDEA, you can CTRL+Click on a class and see the definition.
February 16, 20223 yr 43 minutes ago, matthew123 said: Also, Eclipse is not a good IDE why? 43 minutes ago, matthew123 said: With IDEA, you can CTRL+Click on a class and see the definition. This also work in eclipse
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.