Fixed some following bugs.

This commit is contained in:
batchprogrammer314
2021-06-29 16:29:30 -05:00
parent 68ba0aa28c
commit 70b39259fa
4 changed files with 90 additions and 22 deletions

View File

@@ -27,4 +27,13 @@ public class MathUtils {
return out;
}
public static Vector circleOffset(double r) {
double rad = 2 * Math.random() * Math.PI;
double x = r * Math.random() * Math.cos(rad);
double z = r * Math.random() * Math.sin(rad);
return new Vector(x, 0, z);
}
}

View File

@@ -0,0 +1,10 @@
package net.nuggetmc.ai.utils;
import org.bukkit.GameMode;
public class PlayerUtils {
public static boolean isVulnerableGamemode(GameMode mode) {
return mode == GameMode.SURVIVAL || mode == GameMode.ADVENTURE;
}
}