# [1.8.9] How to get the position of ender pearl's to be landed place?

## Recommended Posts

How to get the position of  ender pearl's to be landed place?

##### Share on other sites

When?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

DO NOT PM ME WITH PROBLEMS. No help will be given.

##### Share on other sites

12 hours ago, Draco18s said:

When?

When the player is holding it and look at the specific position (to be landed place)

##### Share on other sites

Did you even look at the ItemEnderPearl class? The code there is quite clear.

Anyway that is not really how a throwable works -- it doesn't exactly know where it will land, rather there is math that set its initial velocity such that it travels "naturally" away from the player and then the game physics processes the further movement over successive game ticks. But for example if you look up, where you're looking isn't the same as where it will land.

To predict where it would land is pretty difficult. You'd have to simulate it. It is possible -- most people would use an "invisible" entity that you'd shoot at same velocity but would run all the "ticks" within one tick. Note that even then it is possible for the world to change while the ender pearl is in flight and so where it is predicted to land could theoretically not match where it actually lands.

What are you trying to actually do?

Edited by jabelar

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

##### Share on other sites

39 minutes ago, jabelar said:

Did you even look at the ItemEnderPearl class? The code there is quite clear.

Anyway that is not really how a throwable works -- it doesn't exactly know where it will land, rather there is math that set its initial velocity such that it travels "naturally" away from the player and then the game physics processes the further movement over successive game ticks. But for example if you look up, where you're looking isn't the same as where it will land.

To predict where it would land is pretty difficult. You'd have to simulate it. It is possible -- most people would use an "invisible" entity that you'd shoot at same velocity but would run all the "ticks" within one tick. Note that even then it is possible for the world to change while the ender pearl is in flight and so where it is predicted to land could theoretically not match where it actually lands.

What are you trying to actually do?

Yes, I have already looked at ItemEnderPearl and EntityEnderPearl, but no luck. Here is my code: https://pastebin.com/Ff1eXKJk

But it isn't correct, it keeps saying "It is dangerous to throw", I throwed it and I still on the ground (safe)

##### Share on other sites

8 hours ago, lethinh said:

Yes, I have already looked at ItemEnderPearl and EntityEnderPearl, but no luck. Here is my code: https://pastebin.com/Ff1eXKJk

But it isn't correct, it keeps saying "It is dangerous to throw", I throwed it and I still on the ground (safe)

You haven't simulated anything. You created a new ender pearl entity and then....did nothing with it. You didn't even set its position (so the default values of 0,0,0 apply) and then ask the game "can this location see the sky?" No, no it cannot.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

DO NOT PM ME WITH PROBLEMS. No help will be given.

## 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.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

### Announcements

×

• #### Activity

×
• Create New...