mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 22:23:59 +01:00
Rename methods
This commit is contained in:
parent
1f1f2442d4
commit
779aaa8f74
@ -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