first commit-ish, forked and updated for 1.21.11
Some checks failed
Compile / gradle (ubuntu-latest) (push) Has been cancelled
Some checks failed
Compile / gradle (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
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
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.
@@ -17,6 +17,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.21.1-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);
|
||||||
|
|
||||||
|
|||||||
@@ -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()) {
|
||||||
@@ -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...");
|
||||||
|
|
||||||
|
scheduler.runTask(plugin, () -> {
|
||||||
bots.values().forEach(Terminator::removeBot);
|
bots.values().forEach(Terminator::removeBot);
|
||||||
bots.clear();
|
bots.clear();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*print("Removing all current bots...");
|
/*print("Removing all current bots...");
|
||||||
|
|||||||
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.
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