SPIGOT-3807: Improve getEyeHeight

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2018-02-10 12:17:00 +11:00
parent 920e1b53d9
commit e7c0344002
2 changed files with 4 additions and 13 deletions

View file

@ -126,7 +126,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return getHandle().getHeadHeight();
}
public double getEyeHeight(boolean ignoreSneaking) {
public double getEyeHeight(boolean ignorePose) {
return getEyeHeight();
}

View file

@ -131,20 +131,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override
public double getEyeHeight() {
return getEyeHeight(false);
}
@Override
public double getEyeHeight(boolean ignoreSneaking) {
if (ignoreSneaking) {
public double getEyeHeight(boolean ignorePose) {
if (ignorePose) {
return 1.62D;
} else {
if (isSneaking()) {
return 1.54D;
} else {
return 1.62D;
}
return getEyeHeight();
}
}