Fix entities looking at feet instead of eyes

This commit is contained in:
fullwall 2016-11-26 22:38:14 +08:00
parent deffc24bb7
commit 002d7b71d2

View File

@ -54,7 +54,11 @@ public class Util {
public static void faceEntity(Entity entity, Entity at) {
if (at == null || entity == null || entity.getWorld() != at.getWorld())
return;
faceLocation(entity, at.getLocation(AT_LOCATION));
if (at instanceof LivingEntity) {
faceLocation(entity, ((LivingEntity) at).getEyeLocation());
} else {
faceLocation(entity, at.getLocation(AT_LOCATION));
}
}
public static void faceLocation(Entity entity, Location to) {