Jump to content

[1.8.9] Check if a player is at the edge of a block?


Recommended Posts

I didn't find anything specifically on this topic, so I decided to ask for assistance. I'm trying to test if a player is at the edge of a block, and I'm having issues doing so. Any help? I'm decently new to this, so an example/explanation would be amazing. Thanks!



Edited by Darkwiiyou
Link to comment
Share on other sites

I don't know off the top of my head, but best thing is to think if there is already a vanilla feature that does something similar. For example, since there is the feature that you can hold down shift and keep you from going over an edge there must be code there that would be useful.


Or, conversely you can look at the code that checks to see when the player should fall. That should also give you a clue.

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.

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.