Jump to content

Right clicking with an empty hand


Recommended Posts

For a mod I'm making I want the player to spawn an EntityThrowable when the player right clicks and has a full set of a certain type of armor on.

I've tried using PlayerInteractEvent, but the RIGHT_CLICK_AIR action, which is the one I mostly need to use, only runs on the client and not on the server. An EntityThrowable will only work normally when it's spawned on the server though so PlayerInteractEvent doesn't seem to work for me.

Another Event I found is InputEvent.MouseInputEvent. However, there doesn't seem to be any way to figure out which kind of mouse input (right click) it is nor do I see a way to find out which player right clicked.


Is there some kind of method in EntityPlayer I could use to record right clicks or is there an event I'm missing?

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.

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.