Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

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

  • Author
12 hours ago, Draco18s said:

When?

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

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/

  • Author
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)

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.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

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.

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.