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

Adapting objectMouseOver() method's logic to use server side data.


Recommended Posts

Depends. Is it just that you need to use server-side data for something on the client? Or are you actually trying to have the server do something? If what you want is the former, I would use packets to request the information from the server and have it sent back to the client. If you want the latter, I would look in to using LivingUpdateEvent, check if the entity is a player, and write code similar to Entity::rayTrace() (A client only method, which is why you would need to recreate something similar) to determine if the player is looking at an entity.

Edited by The_Fireplace

If I helped please press the Thank You button.


Check out my mods at http://www.curse.com/users/The_Fireplace/projects

Link to comment
Share on other sites

You might want to check out my tutorial where I create a weapon with extended reach. In that case I had to find the entity that mouse was pointing at and tell server to process an attack. As mentioned above, the key is to have client send the information to server with custom packet message.


My tutorial is here: http://jabelarminecraft.blogspot.com/p/minecraft-modding-extending-reach-of.html


Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.

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 Privacy Policy.