Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to show Mouse in GUI


Schleim_time
 Share

Recommended Posts

13 minutes ago, Schleim_time said:

@Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { Main.proxy.openClientNewspaperGUI(data); return super.onItemRightClick(worldIn, playerIn, handIn); }

This is still reaching across logical sides.

You have to check if World#isRemote is true before calling your proxy.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, diesieben07 said:
1 hour ago, Schleim_time said:

@Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { Main.proxy.openClientNewspaperGUI(data); return super.onItemRightClick(worldIn, playerIn, handIn); }

This is still reaching across logical sides.

You have to check if World#isRemote is true before calling your proxy.

Sorry, but could you explain why this is reaching across logical sides? I would've expected this to simply call an empty method on the server side, and open the GUI on the client side, based on the proxy.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

Link to comment
Share on other sites

@SidedProxy checks physical side. The Minecraft Client will use your client proxy (this includes the integrated server!).

If onItemRightClick is now called in single player (using integrated server) it will be called twice, once on the integrated server, once on the client. Both times this code will call the client proxy method, reaching across logical sides in the integrated server case.

  • Thanks 1
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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.