Jump to content

Recommended Posts

Posted

You're supposed to wait more than a few hours before bumping your own topic.

 

anyway, I don't think there is a dedicated event for dismounting.  However, it should be easy to check if something is mounted so you can monitor that (maybe with player tick event) and do what you want.

 

I think the EntityPlayerSP and EntityPlayerMP have a public isRiding() method that you can check. If you keep track of that, you will be able to detect when there is a dismount because at some point it will be riding then it will be not riding.

 

If you're only concerned about a custom entity of yours, you can also do this the other way -- in the update task for the entity you could check if it is being ridden and similarly look for a dismount.

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

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.