idk I dont remember
Some checks failed
Compile / gradle (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Justus Wolff
2026-03-13 14:04:44 +01:00
parent b553e36819
commit 4491025245
103 changed files with 712 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@@ -113,6 +113,17 @@ public class LegacyAgent extends Agent {
}
}
private void placeblocking(Location location, Terminator bot) {
Block block = location.getBlock();
if (block.getType() == Material.AIR) {
bot.setItem(new ItemStack(Material.COBBLESTONE));
block.setType(Material.COBBLESTONE);
bot.punch();
for (Player all : Bukkit.getOnlinePlayers())
all.playSound(bot.getLocation(), Sound.BLOCK_STONE_PLACE, SoundCategory.BLOCKS, 1, 1);
}
}
private void tickBot(Terminator bot) {
if (!bot.isBotAlive()) {
return;
@@ -134,7 +145,7 @@ public class LegacyAgent extends Agent {
tryWindchargeMaceAttack(bot, livingTarget, false);
} else if (bot.getLocation().getY() > livingTarget.getLocation().getY() && bot.getLocation().distanceSquared(livingTarget.getLocation()) <= 4 && macemode(bot)) {
bot.jump();
macesmash(bot, livingTarget, false, 2.5);
macesmash(bot, livingTarget, false, 10);
}
blockCheck.clutch(bot, livingTarget);
@@ -153,7 +164,7 @@ public class LegacyAgent extends Agent {
network.feed(BotData.generate(bot, livingTarget));
}
if (entholdsmace(livingTarget) && livingTarget.getLocation().getY() > bot.getLocation().getY()) {
if (livingTarget.getLocation().getY() > bot.getLocation().getY()) {
bot.block(10, 0);
}
if (bot.tickDelay(3) && !miningAnim.containsKey(botPlayer)) {
@@ -163,13 +174,21 @@ public class LegacyAgent extends Agent {
if (ai) {
if (network.check(BotNode.BLOCK) && loc.distance(livingTarget.getLocation()) < 6) {
bot.block(10, 10);
bot.block(20, 0);
}
}
if (LegacyUtils.checkFreeSpace(botEyeLoc, playerEyeLoc) || LegacyUtils.checkFreeSpace(botEyeLoc, playerLoc)) {
if (LegacyUtils.checkFreeSpace(botEyeLoc, playerEyeLoc) || LegacyUtils.checkFreeSpace(botEyeLoc, playerLoc) && bot.getLocation().distanceSquared(livingTarget.getLocation()) <= 10) {
// place an block over the target such that he cant windcharge away or smth
World world = livingTarget.getWorld();
placeblocking(livingTarget.getLocation().add(new Location(world, 0, 2, 0)), bot); // over target
placeblocking(livingTarget.getLocation().add(new Location(world, 0, 0, 1)), bot); // +z
placeblocking(livingTarget.getLocation().add(new Location(world, 0, 0, -1)), bot); // -z
placeblocking(livingTarget.getLocation().add(new Location(world, 1, 0, 0)), bot); // +x
placeblocking(livingTarget.getLocation().add(new Location(world, -1, 0, 0)), bot); // -x
attack(bot, livingTarget, loc);
}
}
@@ -208,7 +227,7 @@ public class LegacyAgent extends Agent {
if (checkDown(bot, botPlayer, livingTarget.getLocation(), bothXZ)) return;
if ((withinTargetXZ || sameXZ) && entholdsmace(livingTarget) && livingTarget.getLocation().getY() > bot.getLocation().getY() && bot.getLocation().distanceSquared(livingTarget.getLocation()) > 5) {
if ((withinTargetXZ || sameXZ) && !entholdsmace(livingTarget) && livingTarget.getLocation().getY() > bot.getLocation().getY() && bot.getLocation().distanceSquared(livingTarget.getLocation()) > 5) {
if (checkUp(bot, livingTarget, botPlayer, target, withinTargetXZ, sameXZ)) return;
}