mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Going to rework this, ignore this commit.
This commit is contained in:
1 parent
1f53f4d1cd
commit
f4b84a7013
2 files changed
+26
-245
No files matched your search
@@ -131,6 +131,21 @@ public final class Utilities
|
||||
}
|
||||
return getDirection(rot);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cardinal compass direction of a location.
|
||||
*
|
||||
* @param location
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static String getCardinalDirectionLoc(Location player) {
|
||||
double rot = (player.getYaw() - 90) % 360;
|
||||
if (rot < 0) {
|
||||
rot += 360.0;
|
||||
}
|
||||
return getDirection(rot);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a rotation to a cardinal direction name.
|
||||
|
||||
Reference in new issue
Block a user