mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Added and tested backwards compatibility for 1.13 and 1.14.
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user