From 9ab298de7b0055e0d3dbb64390104ea48a14207b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 10 Feb 2018 12:17:00 +1100 Subject: SPIGOT-3807: Improve getEyeHeight --- .../org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 2 +- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 425919cd..bf4428e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -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(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 9405e6b4..20059b94 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -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(); } } -- cgit v1.2.3