Jump to content

Recommended Posts

Posted

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?

Posted

There are many tutorials out there for this.

As for the id, its w/e the hell you set, I recomend something logical like 1 for your first gui, 2 for the 2nd and so forth...

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

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?

Posted

I have this line of code right above my main mod class (I have a PacketHandler set up):

 

@NetworkMod(channels = { "Custom Music" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)

 

Do I need to do something more to get this to work?

Posted

I've had that there all along, and it still wasn't working. I don't know what else I can do. It still says that my mod isn't a networkmod.

 

Also, the mcp recompiler is using the 1.6 source rather than the 7 source, so I can't use strings in switches. How can I change which source the mcp recomplier uses?

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.

Announcements



×
×
  • Create New...

Important Information

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