Jump to content

[SOLVED] Why does openRemoteGui require Container?


gokiburi

Recommended Posts

java.lang.ClassCastException: gokimods.xpstorage.client.GuiXPStorage cannot be cast to net.minecraft.src.Container

at cpw.mods.fml.common.network.NetworkRegistry.openRemoteGui(NetworkRegistry.java:302)

 

The function getServerGuiElement allows to take in a GuiScreen or Container (as expressed by the documentation) but openRemoteGui  will throw the above error if it's not a Container.

 

Why is this the case?

Link to comment
Share on other sites

Only open the gui client side if it doesnt need to talk to the server, Guis server side are inventories, so you'd have to deal with that or figure out how you wanna deal with your stuff properly.

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

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.

Announcements



×
×
  • Create New...

Important Information

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