November 21, 20177 yr 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.
November 22, 20177 yr Author 12 hours ago, Draco18s said: When? When the player is holding it and look at the specific position (to be landed place)
November 22, 20177 yr 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 November 22, 20177 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
November 22, 20177 yr 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)
November 22, 20177 yr 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.