Skip to content

Commit

Permalink
Fix entities looking at feet instead of eyes
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 26, 2016
1 parent deffc24 commit 002d7b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/src/main/java/net/citizensnpcs/util/Util.java
Expand Up @@ -54,7 +54,11 @@ public static float clampYaw(float yaw) {
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) {
Expand Down

0 comments on commit 002d7b7

Please sign in to comment.