Jump to content

How can I open my new Gui?


Fricative_Melon

Recommended Posts

I want a gui I've created to open when a block I've made is right clicked(onBlockActivated), but I can't find any suitable methods. The openGui method in the EntityPlayer class requires a gui id, but I have no idea what that is. I've looked at the methods the vanilla gui's use, but they require a minecraft instance that I don't know how to create. Does anyone know how to open a new gui in Forge?

Link to comment
Share on other sites

I think I've figured it out, but when I right click on my block to open a Gui, the command window says "[WARNING] [ForgeModLoader] A mod tried to open a gui on the server without being a NetworkMod" and the gui fails to open. I have the "Mod", "NetworkMod", and "SidedProxy" annotations set up according to the google doc on the first block tutorial page on forge wiki, and I set up the GuiHandler (implementing IGuiHandler and overriding the methods) according to the Containers and Gui tutorial on the wiki. My mod works fine otherwise (the blocks and items I created work correctly) How can I make my mode a NetworkMod? I've searched for solutions, but I can't find any using google.

 

Also, the command window says that my textures aren't preloading. How do I preload textures?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.