Added and tested backwards compatibility for 1.13 and 1.14.

This commit is contained in:
Rammelkast committed 2020-03-31 13:10:14 +02:00
1 parent f77d45a78d
commit 6afe0049c5
11 files changed
+78 -45

No files matched your search

@@ -61,7 +61,7 @@ public class KillAuraCheck {
LivingEntity living = (LivingEntity) entity;
Location eyeLocation = player.getEyeLocation();
double yawDifference = calculateYawDifference(eyeLocation, living.getLocation());
double yawDifference = KillauraAssist.calculateYawDifference(eyeLocation, living.getLocation());
double playerYaw = player.getEyeLocation().getYaw();
double angleDifference = Math.abs(180 - Math.abs(Math.abs(yawDifference - playerYaw) - 180));
@@ -83,14 +83,6 @@ public class KillAuraCheck {
return PASS;
}
public static double calculateYawDifference(Location from, Location to) {
Location clonedFrom = from.clone();
Vector startVector = clonedFrom.toVector();
Vector targetVector = to.toVector();
clonedFrom.setDirection(targetVector.subtract(startVector));
return clonedFrom.getYaw();
}
static {
KILLAURA_ASSIST = new KillauraAssist();
}