mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-22 15:22:11 +01:00
Fix entities looking at feet instead of eyes
This commit is contained in:
parent
deffc24bb7
commit
002d7b71d2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user