neural networks fully set up for velocity
This commit is contained in:
@@ -96,6 +96,21 @@ public class Debugger {
|
||||
* DEBUGGER METHODS
|
||||
*/
|
||||
|
||||
public void offsets(boolean b) {
|
||||
Agent agent = TerminatorPlus.getInstance().getManager().getAgent();
|
||||
if (!(agent instanceof LegacyAgent)) {
|
||||
print("This method currently only supports " + ChatColor.AQUA + "LegacyAgent" + ChatColor.RESET + ".");
|
||||
return;
|
||||
}
|
||||
|
||||
LegacyAgent legacyAgent = (LegacyAgent) agent;
|
||||
legacyAgent.offsets = b;
|
||||
|
||||
print("Bot target offsets are now "
|
||||
+ (legacyAgent.offsets ? ChatColor.GREEN + "ENABLED" : ChatColor.RED + "DISABLED")
|
||||
+ ChatColor.RESET + ".");
|
||||
}
|
||||
|
||||
public void confuse(int n) {
|
||||
if (!(sender instanceof Player)) return;
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@ package net.nuggetmc.ai.utils;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
public class MathUtils {
|
||||
|
||||
public static final Random RANDOM = new Random();
|
||||
public static final DecimalFormat FORMATTER_1 = new DecimalFormat("0.#");
|
||||
public static final DecimalFormat FORMATTER_2 = new DecimalFormat("0.##");
|
||||
|
||||
public static float[] fetchYawPitch(Vector dir) {
|
||||
double x = dir.getX();
|
||||
@@ -79,4 +82,12 @@ public class MathUtils {
|
||||
public static double square(double n) {
|
||||
return n * n;
|
||||
}
|
||||
|
||||
public static String round1Dec(double n) {
|
||||
return FORMATTER_1.format(n);
|
||||
}
|
||||
|
||||
public static String round2Dec(double n) {
|
||||
return FORMATTER_2.format(n);
|
||||
}
|
||||
}
|
||||
|
||||
13
src/main/java/net/nuggetmc/ai/utils/StringUtilities.java
Normal file
13
src/main/java/net/nuggetmc/ai/utils/StringUtilities.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package net.nuggetmc.ai.utils;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
|
||||
public class StringUtilities {
|
||||
|
||||
public static final String ON = ChatColor.GREEN.toString();
|
||||
public static final String OFF = ChatColor.GRAY.toString();
|
||||
|
||||
public static String trim16(String str) {
|
||||
return str.length() > 16 ? str.substring(0, 16) : str;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package net.nuggetmc.ai.utils;
|
||||
|
||||
public class StringUtils {
|
||||
public static String trim16(String str) {
|
||||
return str.length() > 16 ? str.substring(0, 16) : str;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user