mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 06:31:57 +01:00
SPIGOT-3807: Improve getEyeHeight
This commit is contained in:
parent
aa34e9bddd
commit
9ab298de7b
2 changed files with 4 additions and 13 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue