13
0
geforkt von Mirrors/Paper

SPIGOT-3807: Improve getEyeHeight

Dieser Commit ist enthalten in:
md_5 2018-02-10 12:17:00 +11:00
Ursprung aa34e9bddd
Commit 9ab298de7b
2 geänderte Dateien mit 4 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -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();
}

Datei anzeigen

@ -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();
}
}