Compare commits
10 Commits
30de9f408f
...
53b4f6a04a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53b4f6a04a | ||
|
|
ff9220654b | ||
|
|
8132d7073a | ||
|
|
553e2c4963 | ||
|
|
eb59870632 | ||
|
|
4c0a61342a | ||
|
|
9d3db734bc | ||
|
|
673451779a | ||
|
|
dbfdef89ac | ||
|
|
77b9915b39 |
6
.github/workflows/compile.yml
vendored
6
.github/workflows/compile.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 21
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
@@ -26,4 +26,6 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: TerminatorPlus
|
name: TerminatorPlus
|
||||||
path: build/libs/
|
path: |
|
||||||
|
build/libs/
|
||||||
|
TerminatorPlus-API/build/libs
|
||||||
|
|||||||
BIN
.gradle/8.11.1/checksums/checksums.lock
Normal file
BIN
.gradle/8.11.1/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/checksums/md5-checksums.bin
Normal file
BIN
.gradle/8.11.1/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/checksums/sha1-checksums.bin
Normal file
BIN
.gradle/8.11.1/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/executionHistory/executionHistory.bin
Normal file
BIN
.gradle/8.11.1/executionHistory/executionHistory.bin
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/executionHistory/executionHistory.lock
Normal file
BIN
.gradle/8.11.1/executionHistory/executionHistory.lock
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/expanded/expanded.lock
Normal file
BIN
.gradle/8.11.1/expanded/expanded.lock
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/fileChanges/last-build.bin
Normal file
BIN
.gradle/8.11.1/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/fileHashes/fileHashes.bin
Normal file
BIN
.gradle/8.11.1/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/8.11.1/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
BIN
.gradle/8.11.1/fileHashes/resourceHashesCache.bin
Normal file
BIN
.gradle/8.11.1/fileHashes/resourceHashesCache.bin
Normal file
Binary file not shown.
0
.gradle/8.11.1/gc.properties
Normal file
0
.gradle/8.11.1/gc.properties
Normal file
BIN
.gradle/9.0.0/checksums/checksums.lock
Normal file
BIN
.gradle/9.0.0/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/checksums/md5-checksums.bin
Normal file
BIN
.gradle/9.0.0/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/checksums/sha1-checksums.bin
Normal file
BIN
.gradle/9.0.0/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/executionHistory/executionHistory.bin
Normal file
BIN
.gradle/9.0.0/executionHistory/executionHistory.bin
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/executionHistory/executionHistory.lock
Normal file
BIN
.gradle/9.0.0/executionHistory/executionHistory.lock
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/expanded/expanded.lock
Normal file
BIN
.gradle/9.0.0/expanded/expanded.lock
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/fileChanges/last-build.bin
Normal file
BIN
.gradle/9.0.0/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/fileHashes/fileHashes.bin
Normal file
BIN
.gradle/9.0.0/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/9.0.0/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
BIN
.gradle/9.0.0/fileHashes/resourceHashesCache.bin
Normal file
BIN
.gradle/9.0.0/fileHashes/resourceHashesCache.bin
Normal file
Binary file not shown.
0
.gradle/9.0.0/gc.properties
Normal file
0
.gradle/9.0.0/gc.properties
Normal file
BIN
.gradle/buildOutputCleanup/buildOutputCleanup.lock
Normal file
BIN
.gradle/buildOutputCleanup/buildOutputCleanup.lock
Normal file
Binary file not shown.
2
.gradle/buildOutputCleanup/cache.properties
Normal file
2
.gradle/buildOutputCleanup/cache.properties
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#Mon Mar 02 13:41:08 CET 2026
|
||||||
|
gradle.version=9.0.0
|
||||||
BIN
.gradle/buildOutputCleanup/outputFiles.bin
Normal file
BIN
.gradle/buildOutputCleanup/outputFiles.bin
Normal file
Binary file not shown.
BIN
.gradle/file-system.probe
Normal file
BIN
.gradle/file-system.probe
Normal file
Binary file not shown.
BIN
.gradle/noVersion/buildLogic.lock
Normal file
BIN
.gradle/noVersion/buildLogic.lock
Normal file
Binary file not shown.
0
.gradle/vcs-1/gc.properties
Normal file
0
.gradle/vcs-1/gc.properties
Normal file
@@ -36,7 +36,7 @@ Terminator terminator = TerminatorPlusAPI.getBotManager().createBot(location, "B
|
|||||||
|
|
||||||
### Version Support
|
### Version Support
|
||||||
|
|
||||||
This plugin requires [Paper 1.20.4](https://papermc.io/downloads/all).
|
This plugin requires [Paper 1.21.1](https://papermc.io/downloads/all).
|
||||||
|
|
||||||
### Future Updates
|
### Future Updates
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
java
|
||||||
id("net.nuggetmc.java-conventions")
|
id("net.nuggetmc.java-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
|
||||||
compileOnly("com.mojang:authlib:3.2.38")
|
compileOnly("com.mojang:authlib:3.2.38")
|
||||||
|
compileOnly("com.googlecode.json-simple:json-simple:1.1.1")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ public interface BotManager {
|
|||||||
|
|
||||||
List<String> fetchNames();
|
List<String> fetchNames();
|
||||||
|
|
||||||
Terminator createBot(Location loc, String name, String skin, String signature);
|
Terminator createBot(Location loc, String name, String skin);
|
||||||
|
|
||||||
void createBots(CommandSender sender, String name, String skinName, int n, Location location);
|
void createBots(CommandSender sender, String name, String skinName, int n, Location location);
|
||||||
|
|
||||||
void createBots(CommandSender sender, String name, String skinName, int n, NeuralNetwork network, Location location);
|
void createBots(CommandSender sender, String name, String skinName, int n, NeuralNetwork network, Location location);
|
||||||
|
|
||||||
Set<Terminator> createBots(Location loc, String name, String[] skin, List<NeuralNetwork> networks);
|
Set<Terminator> createBots(Location loc, String name, String skin, List<NeuralNetwork> networks);
|
||||||
|
|
||||||
Set<Terminator> createBots(Location loc, String name, String[] skin, int n, NeuralNetwork network);
|
Set<Terminator> createBots(Location loc, String name, String skin, int n, NeuralNetwork network);
|
||||||
|
|
||||||
void remove(Terminator bot);
|
void remove(Terminator bot);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package net.nuggetmc.tplus.api.agent.legacyagent;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public enum CustomListMode {
|
||||||
|
HOSTILE,
|
||||||
|
RAIDER,
|
||||||
|
MOB,
|
||||||
|
CUSTOM;
|
||||||
|
|
||||||
|
public static boolean isValid(String name) {
|
||||||
|
return from(name) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CustomListMode from(String name) {
|
||||||
|
for (CustomListMode mode : values()) {
|
||||||
|
if (mode.name().equalsIgnoreCase(name)) {
|
||||||
|
return mode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String listModes() {
|
||||||
|
return Arrays.stream(values()).map(e -> e.name().toLowerCase()).collect(Collectors.joining("|"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,7 +58,7 @@ public class LegacyAgent extends Agent {
|
|||||||
private double regionWeightZ;
|
private double regionWeightZ;
|
||||||
|
|
||||||
public static final Set<EntityType> CUSTOM_MOB_LIST = new HashSet<>();
|
public static final Set<EntityType> CUSTOM_MOB_LIST = new HashSet<>();
|
||||||
public static String customListMode = "custom";
|
public static CustomListMode customListMode = CustomListMode.CUSTOM;
|
||||||
|
|
||||||
public LegacyAgent(BotManager manager, Plugin plugin) {
|
public LegacyAgent(BotManager manager, Plugin plugin) {
|
||||||
super(manager, plugin);
|
super(manager, plugin);
|
||||||
@@ -1068,6 +1068,7 @@ public class LegacyAgent extends Agent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void blockBreakEffect(Terminator bot, LivingEntity player, Block block, LegacyLevel.LevelWrapper wrapper) {
|
private void blockBreakEffect(Terminator bot, LivingEntity player, Block block, LegacyLevel.LevelWrapper wrapper) {
|
||||||
|
if (bot == null) {return;}
|
||||||
|
|
||||||
if (LegacyMats.NO_CRACK.contains(block.getType())) return;
|
if (LegacyMats.NO_CRACK.contains(block.getType())) return;
|
||||||
|
|
||||||
@@ -1314,7 +1315,7 @@ public class LegacyAgent extends Agent {
|
|||||||
bot.look(BlockFace.DOWN);
|
bot.look(BlockFace.DOWN);
|
||||||
bot.punch();
|
bot.punch();
|
||||||
|
|
||||||
Boat boat = (Boat) world.spawnEntity(place, EntityType.BOAT);
|
Boat boat = (Boat) world.spawnEntity(place, EntityType.OAK_BOAT);
|
||||||
|
|
||||||
scheduler.runTaskLater(plugin, () -> {
|
scheduler.runTaskLater(plugin, () -> {
|
||||||
if (!boat.isDead()) {
|
if (!boat.isDead()) {
|
||||||
@@ -1462,7 +1463,7 @@ public class LegacyAgent extends Agent {
|
|||||||
|
|
||||||
case NEAREST_HOSTILE: {
|
case NEAREST_HOSTILE: {
|
||||||
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
if ((entity instanceof Monster || (customListMode.equals("hostile") && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
if ((entity instanceof Monster || (customListMode == CustomListMode.HOSTILE && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
||||||
result = entity;
|
result = entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1473,7 +1474,7 @@ public class LegacyAgent extends Agent {
|
|||||||
case NEAREST_RAIDER: {
|
case NEAREST_RAIDER: {
|
||||||
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
boolean raider = entity instanceof Raider || (entity instanceof Vex vex && vex.getSummoner() instanceof Raider);
|
boolean raider = entity instanceof Raider || (entity instanceof Vex vex && vex.getSummoner() instanceof Raider);
|
||||||
if ((raider || (customListMode.equals("raider") && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
if ((raider || (customListMode == CustomListMode.RAIDER && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
||||||
result = entity;
|
result = entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1483,7 +1484,7 @@ public class LegacyAgent extends Agent {
|
|||||||
|
|
||||||
case NEAREST_MOB: {
|
case NEAREST_MOB: {
|
||||||
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
if ((entity instanceof Mob || (customListMode.equals("mob") && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
if ((entity instanceof Mob || (customListMode == CustomListMode.MOB && CUSTOM_MOB_LIST.contains(entity.getType()))) && validateCloserEntity(entity, loc, result)) {
|
||||||
result = entity;
|
result = entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1539,7 +1540,7 @@ public class LegacyAgent extends Agent {
|
|||||||
|
|
||||||
case CUSTOM_LIST: {
|
case CUSTOM_LIST: {
|
||||||
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
if (customListMode.equals("custom") && CUSTOM_MOB_LIST.contains(entity.getType()) && validateCloserEntity(entity, loc, result)) {
|
if (customListMode == CustomListMode.CUSTOM && CUSTOM_MOB_LIST.contains(entity.getType()) && validateCloserEntity(entity, loc, result)) {
|
||||||
result = entity;
|
result = entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1565,6 +1566,8 @@ public class LegacyAgent extends Agent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean validateCloserEntity(LivingEntity entity, Location loc, LivingEntity result) {
|
private boolean validateCloserEntity(LivingEntity entity, Location loc, LivingEntity result) {
|
||||||
|
if (entity == null)
|
||||||
|
return false;
|
||||||
double regionDistEntity = getWeightedRegionDist(entity.getLocation());
|
double regionDistEntity = getWeightedRegionDist(entity.getLocation());
|
||||||
if (regionDistEntity == Double.MAX_VALUE)
|
if (regionDistEntity == Double.MAX_VALUE)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class LegacyMats {
|
|||||||
|
|
||||||
public static final Set<Material> OBSTACLES = new HashSet<>(concatTypes(Lists.newArrayList(
|
public static final Set<Material> OBSTACLES = new HashSet<>(concatTypes(Lists.newArrayList(
|
||||||
Material.IRON_BARS,
|
Material.IRON_BARS,
|
||||||
Material.CHAIN,
|
Material.IRON_CHAIN,
|
||||||
Material.END_ROD,
|
Material.END_ROD,
|
||||||
Material.LIGHTNING_ROD,
|
Material.LIGHTNING_ROD,
|
||||||
Material.COBWEB,
|
Material.COBWEB,
|
||||||
@@ -282,7 +282,7 @@ public class LegacyMats {
|
|||||||
|
|
||||||
public static boolean canPlaceWater(Block block, Optional<Double> entityYPos) {
|
public static boolean canPlaceWater(Block block, Optional<Double> entityYPos) {
|
||||||
if (isSolid(block.getType())) {
|
if (isSolid(block.getType())) {
|
||||||
if (block.getType() == Material.CHAIN && ((Chain)block.getBlockData()).getAxis() == Axis.Y
|
if (block.getType() == Material.IRON_CHAIN && ((Chain)block.getBlockData()).getAxis() == Axis.Y
|
||||||
&& !((Chain)block.getBlockData()).isWaterlogged())
|
&& !((Chain)block.getBlockData()).isWaterlogged())
|
||||||
return false;
|
return false;
|
||||||
if ((block.getType().data == Leaves.class || block.getType() == Material.MANGROVE_ROOTS
|
if ((block.getType().data == Leaves.class || block.getType() == Material.MANGROVE_ROOTS
|
||||||
@@ -387,7 +387,7 @@ public class LegacyMats {
|
|||||||
case CACTUS:
|
case CACTUS:
|
||||||
case DRAGON_EGG:
|
case DRAGON_EGG:
|
||||||
case TURTLE_EGG:
|
case TURTLE_EGG:
|
||||||
case CHAIN:
|
case IRON_CHAIN:
|
||||||
case IRON_BARS:
|
case IRON_BARS:
|
||||||
case LANTERN:
|
case LANTERN:
|
||||||
case SOUL_LANTERN:
|
case SOUL_LANTERN:
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import net.nuggetmc.tplus.api.agent.legacyagent.EnumTargetGoal;
|
|||||||
import net.nuggetmc.tplus.api.agent.legacyagent.LegacyAgent;
|
import net.nuggetmc.tplus.api.agent.legacyagent.LegacyAgent;
|
||||||
import net.nuggetmc.tplus.api.utils.ChatUtils;
|
import net.nuggetmc.tplus.api.utils.ChatUtils;
|
||||||
import net.nuggetmc.tplus.api.utils.MathUtils;
|
import net.nuggetmc.tplus.api.utils.MathUtils;
|
||||||
import net.nuggetmc.tplus.api.utils.MojangAPI;
|
|
||||||
import net.nuggetmc.tplus.api.utils.PlayerUtils;
|
import net.nuggetmc.tplus.api.utils.PlayerUtils;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@@ -102,14 +101,12 @@ public class IntelligenceAgent {
|
|||||||
|
|
||||||
print("Starting generation " + ChatColor.RED + generation + ChatColor.RESET + "...");
|
print("Starting generation " + ChatColor.RED + generation + ChatColor.RESET + "...");
|
||||||
|
|
||||||
sleep(2000);
|
//sleep(2000);
|
||||||
|
|
||||||
String skinName = botSkin == null ? this.botName : botSkin;
|
String skinName = botSkin == null ? this.botName : botSkin;
|
||||||
|
|
||||||
print("Fetching skin data for " + ChatColor.GREEN + skinName + ChatColor.RESET + "...");
|
print("Fetching skin data for " + ChatColor.GREEN + skinName + ChatColor.RESET + "...");
|
||||||
|
|
||||||
String[] skinData = MojangAPI.getSkin(skinName);
|
|
||||||
|
|
||||||
String botName = this.botName.endsWith("%") ? this.botName : this.botName + "%";
|
String botName = this.botName.endsWith("%") ? this.botName : this.botName + "%";
|
||||||
|
|
||||||
print("Creating " + (populationSize == 1 ? "new bot" : ChatColor.RED + NumberFormat.getInstance(Locale.US).format(populationSize) + ChatColor.RESET + " new bots")
|
print("Creating " + (populationSize == 1 ? "new bot" : ChatColor.RED + NumberFormat.getInstance(Locale.US).format(populationSize) + ChatColor.RESET + " new bots")
|
||||||
@@ -124,7 +121,7 @@ public class IntelligenceAgent {
|
|||||||
Set<Terminator> bots;
|
Set<Terminator> bots;
|
||||||
|
|
||||||
if (loadedProfiles == null) {
|
if (loadedProfiles == null) {
|
||||||
bots = manager.createBots(loc, botName, skinData, populationSize, NeuralNetwork.RANDOM);
|
bots = manager.createBots(loc, botName, skinName, populationSize, NeuralNetwork.RANDOM);
|
||||||
} else {
|
} else {
|
||||||
List<NeuralNetwork> networks = new ArrayList<>();
|
List<NeuralNetwork> networks = new ArrayList<>();
|
||||||
loadedProfiles.forEach(profile -> networks.add(NeuralNetwork.createNetworkFromProfile(profile)));
|
loadedProfiles.forEach(profile -> networks.add(NeuralNetwork.createNetworkFromProfile(profile)));
|
||||||
@@ -136,7 +133,7 @@ public class IntelligenceAgent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bots = manager.createBots(loc, botName, skinData, networks);
|
bots = manager.createBots(loc, botName, skinName, networks);
|
||||||
}
|
}
|
||||||
|
|
||||||
bots.forEach(bot -> {
|
bots.forEach(bot -> {
|
||||||
@@ -151,16 +148,16 @@ public class IntelligenceAgent {
|
|||||||
});
|
});
|
||||||
|
|
||||||
while (bots.size() != populationSize) {
|
while (bots.size() != populationSize) {
|
||||||
sleep(1000);
|
sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(2000);
|
//sleep(2000);
|
||||||
print("The bots will now attack each other.");
|
print("The bots will now attack each other.");
|
||||||
|
|
||||||
agent.setTargetType(EnumTargetGoal.NEAREST_BOT);
|
agent.setTargetType(EnumTargetGoal.NEAREST_BOT);
|
||||||
|
|
||||||
while (aliveCount() > 1) {
|
while (aliveCount() > 1) {
|
||||||
sleep(1000);
|
sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Generation " + ChatColor.RED + generation + ChatColor.RESET + " has ended.");
|
print("Generation " + ChatColor.RED + generation + ChatColor.RESET + " has ended.");
|
||||||
@@ -188,7 +185,7 @@ public class IntelligenceAgent {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(3000);
|
//sleep(3000);
|
||||||
|
|
||||||
Map<BotNode, Map<BotDataType, List<Double>>> lists = new HashMap<>();
|
Map<BotNode, Map<BotDataType, List<Double>>> lists = new HashMap<>();
|
||||||
|
|
||||||
@@ -236,9 +233,12 @@ public class IntelligenceAgent {
|
|||||||
|
|
||||||
genProfiles.put(generation + 1, profiles);
|
genProfiles.put(generation + 1, profiles);
|
||||||
|
|
||||||
sleep(2000);
|
//sleep(2000);
|
||||||
|
|
||||||
clearBots();
|
clearBots();
|
||||||
|
while (bots.size() != 0) {
|
||||||
|
sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
agent.setTargetType(EnumTargetGoal.NONE);
|
agent.setTargetType(EnumTargetGoal.NONE);
|
||||||
}
|
}
|
||||||
@@ -326,8 +326,11 @@ public class IntelligenceAgent {
|
|||||||
if (!bots.isEmpty()) {
|
if (!bots.isEmpty()) {
|
||||||
print("Removing all cached bots...");
|
print("Removing all cached bots...");
|
||||||
|
|
||||||
bots.values().forEach(Terminator::removeBot);
|
scheduler.runTask(plugin, () -> {
|
||||||
bots.clear();
|
bots.values().forEach(Terminator::removeBot);
|
||||||
|
bots.clear();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*print("Removing all current bots...");
|
/*print("Removing all current bots...");
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class BotDeathEvent extends EntityDeathEvent {
|
|||||||
private final Terminator bot;
|
private final Terminator bot;
|
||||||
|
|
||||||
public BotDeathEvent(EntityDeathEvent event, Terminator bot) {
|
public BotDeathEvent(EntityDeathEvent event, Terminator bot) {
|
||||||
super(event.getEntity(), event.getDrops(), event.getDroppedExp());
|
super(event.getEntity(), event.getDamageSource(), event.getDrops(), event.getDroppedExp());
|
||||||
this.bot = bot;
|
this.bot = bot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
Command: C:\Program Files\Java\jdk-21.0.10\bin\java.exe -Xmx1G -classpath C:\Users\JUFS-STL-SECONDARY\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.12.0\bfb93e1bfb66d47272ccd37ce894dcfc20ba0b6\tiny-remapper-0.12.0-fat.jar net.fabricmc.tinyremapper.Main C:\Users\JUFS-STL-SECONDARY\Desktop\terminatorplus\TerminatorPlus-Plugin\build\libs\TerminatorPlus-Plugin-4.5.1-BETA.jar C:\Users\JUFS-STL-SECONDARY\Desktop\terminatorplus\TerminatorPlus-Plugin\build\libs\TerminatorPlus-Plugin-4.5.1-BETA-reobf.jar C:\Users\JUFS-STL-SECONDARY\Desktop\terminatorplus\TerminatorPlus-Plugin\.gradle\caches\paperweight\taskCache\reobfMappings.tiny mojang spigot C:\Users\JUFS-STL-SECONDARY\Desktop\terminatorplus\TerminatorPlus-Plugin\.gradle\caches\paperweight\taskCache\mappedServerJar.jar --threads=1
|
||||||
|
[INFO] Finished after 1642.84 ms.
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/Bot.class
Normal file
BIN
TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/Bot.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user