mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 21:29:14 +01:00
Rename methods
This commit is contained in:
parent
c873904dfc
commit
579385cb0d
@ -77,30 +77,30 @@ public class Util {
|
||||
while (degrees > 360D) {
|
||||
degrees -= 360D;
|
||||
}
|
||||
if (isFacingNorth(degrees, leeway))
|
||||
return BlockFace.WEST;
|
||||
if (isFacingEast(degrees, leeway))
|
||||
return BlockFace.NORTH;
|
||||
if (isFacingSouth(degrees, leeway))
|
||||
return BlockFace.EAST;
|
||||
if (isFacingWest(degrees, leeway))
|
||||
return BlockFace.WEST;
|
||||
if (isFacingNorth(degrees, leeway))
|
||||
return BlockFace.NORTH;
|
||||
if (isFacingEast(degrees, leeway))
|
||||
return BlockFace.EAST;
|
||||
if (isFacingSouth(degrees, leeway))
|
||||
return BlockFace.SOUTH;
|
||||
return BlockFace.SELF;
|
||||
}
|
||||
|
||||
private static boolean isFacingEast(double degrees, double leeway) {
|
||||
private static boolean isFacingNorth(double degrees, double leeway) {
|
||||
return (45 - leeway <= degrees) && (degrees < 135 + leeway);
|
||||
}
|
||||
|
||||
private static boolean isFacingNorth(double degrees, double leeway) {
|
||||
private static boolean isFacingWest(double degrees, double leeway) {
|
||||
return ((0 <= degrees) && (degrees < 45 + leeway)) || ((315 - leeway <= degrees) && (degrees <= 360));
|
||||
}
|
||||
|
||||
private static boolean isFacingSouth(double degrees, double leeway) {
|
||||
private static boolean isFacingEast(double degrees, double leeway) {
|
||||
return (135 - leeway <= degrees) && (degrees < 225 + leeway);
|
||||
}
|
||||
|
||||
private static boolean isFacingWest(double degrees, double leeway) {
|
||||
private static boolean isFacingSouth(double degrees, double leeway) {
|
||||
return (225 - leeway <= degrees) && (degrees < 315 + leeway);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user