Is there a method in Sponge API like EntityLiving#getEyeLocation() in Bukkit API ?
I didn’t found it D:
I’am french, so correct my english if I’am wrong.
Is there a method in Sponge API like EntityLiving#getEyeLocation() in Bukkit API ?
I didn’t found it D:
I’am french, so correct my english if I’am wrong.
It’s the location + 1 on y right?
Edit: Nevermind
There is this:
For players it’s +1.62m says the wiki
Ok thanks you,
I will give you a cookie
Edit #1:
I think a shortcut should be nice in future
public Location getEyeLocation() {
return getLocation().add(0, getData(EyeLocationData.class).get().getEyeHeight(), 0);
}
Edit #2:
getData and getOrCreate(EyeLocationData.class) return Optional.absent()
Any way to know if it was implemented or not ?
Once data API is complete it wont return absent.
Ok thank, I will wait