diff --git a/.gradle/9.0.0/executionHistory/executionHistory.bin b/.gradle/9.0.0/executionHistory/executionHistory.bin index 6fc408a..33864c5 100644 Binary files a/.gradle/9.0.0/executionHistory/executionHistory.bin and b/.gradle/9.0.0/executionHistory/executionHistory.bin differ diff --git a/.gradle/9.0.0/executionHistory/executionHistory.lock b/.gradle/9.0.0/executionHistory/executionHistory.lock index 2742ad3..e51dc87 100644 Binary files a/.gradle/9.0.0/executionHistory/executionHistory.lock and b/.gradle/9.0.0/executionHistory/executionHistory.lock differ diff --git a/.gradle/9.0.0/fileHashes/fileHashes.bin b/.gradle/9.0.0/fileHashes/fileHashes.bin index 532a2cc..dba17fb 100644 Binary files a/.gradle/9.0.0/fileHashes/fileHashes.bin and b/.gradle/9.0.0/fileHashes/fileHashes.bin differ diff --git a/.gradle/9.0.0/fileHashes/fileHashes.lock b/.gradle/9.0.0/fileHashes/fileHashes.lock index 9393f96..533bca3 100644 Binary files a/.gradle/9.0.0/fileHashes/fileHashes.lock and b/.gradle/9.0.0/fileHashes/fileHashes.lock differ diff --git a/.gradle/9.0.0/fileHashes/resourceHashesCache.bin b/.gradle/9.0.0/fileHashes/resourceHashesCache.bin index e5d38a8..d87baf7 100644 Binary files a/.gradle/9.0.0/fileHashes/resourceHashesCache.bin and b/.gradle/9.0.0/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 00965d1..667e3fc 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index 7d2763c..29ebbf4 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class index 89d3c20..8ca1bd6 100644 Binary files a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class and b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class differ diff --git a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class index b09c7cf..9062af0 100644 Binary files a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class and b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class differ diff --git a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class index 6a61b9f..ebf92c5 100644 Binary files a/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class and b/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class differ diff --git a/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java b/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java index ce86655..faf6ffb 100644 --- a/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java +++ b/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java @@ -103,6 +103,15 @@ public class LegacyAgent extends Agent { btList.put(botEntity, loc); } + private boolean entholdsmace(LivingEntity target) { + if (target instanceof Player player) { + if (player.getInventory().getItemInMainHand().getType() == Material.MACE) return true; + return false; + } else { + return false; + } + } + private void tickBot(Terminator bot) { if (!bot.isBotAlive()) { return; @@ -120,6 +129,8 @@ public class LegacyAgent extends Agent { if (livingTarget == null) { stopMining(bot); return; + } else if (bot.getVelocity().getY() < 0 || bot.isFalling()) { + tryWindchargeMaceAttack(bot, livingTarget, false); } blockCheck.clutch(bot, livingTarget); @@ -138,6 +149,9 @@ public class LegacyAgent extends Agent { network.feed(BotData.generate(bot, livingTarget)); } + if (entholdsmace(livingTarget) && livingTarget.getLocation().getY() > bot.getLocation().getY()) { + bot.block(10, 10); + } if (bot.tickDelay(3) && !miningAnim.containsKey(botPlayer)) { Location botEyeLoc = botPlayer.getEyeLocation(); Location playerEyeLoc = livingTarget.getEyeLocation(); @@ -148,6 +162,8 @@ public class LegacyAgent extends Agent { bot.block(10, 10); } } + + if (LegacyUtils.checkFreeSpace(botEyeLoc, playerEyeLoc) || LegacyUtils.checkFreeSpace(botEyeLoc, playerLoc)) { attack(bot, livingTarget, loc); @@ -802,6 +818,17 @@ public class LegacyAgent extends Agent { Material m1 = playerNPC.getLocation().add(0, 1, 0).getBlock().getType(); Material m2 = playerNPC.getLocation().add(0, 2, 0).getBlock().getType(); + if (macemode(npc)) { + //npc.jump(); + //useWindcharge(npc); + //Bukkit.getScheduler().scheduleAsyncDelayedTask(plugin, () -> { + // while (npc.getVelocity().getY() > 0) {} + // Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> { + // blockCheck.placeBlock(npc, playerNPC, get); + // }, 0); + //}, 0); + //return false; + } if (LegacyMats.BREAK.contains(m0) && LegacyMats.BREAK.contains(m1) && LegacyMats.BREAK.contains(m2)) { npc.setItem(new ItemStack(Material.COBBLESTONE)); @@ -1403,7 +1430,52 @@ public class LegacyAgent extends Agent { return Math.abs(entity.getWorld().getHighestBlockYAt(entity.getLocation()) - entity.getLocation().getY()); }*/ + private boolean macemode(Terminator bot) { + LivingEntity botEntity = bot.getBukkitEntity(); + if (botEntity == null) { + return false; + } + + ItemStack mainHand; + if (botEntity instanceof Player player) { + mainHand = player.getInventory().getItemInMainHand(); + } else { + return false; + } + + if (bot.getDefaultItem().getType() != Material.MACE && mainHand.getType() != Material.MACE) { + return false; + } + + return true; + } + + private boolean useWindcharge(Terminator bot) { + if (!bot.isBotOnGround() && Math.random() >= 0.5) return false; + + // Face the ground at own position to launch upward + bot.look(org.bukkit.block.BlockFace.DOWN); + + // Jump boost from windcharge with higher velocity + bot.setItem(new ItemStack(Material.WIND_CHARGE, 1)); + Vector jumpVel = new Vector(0, 0.6, 0); + Vector cvel = bot.getVelocity().add(jumpVel); + cvel.setX(clamp(cvel.getX(), -0.05, 0.05)); + cvel.setZ(clamp(cvel.getZ(), -0.05, 0.05)); + bot.setVelocity(cvel); + World world = bot.getLocation().getWorld(); + if (world != null) { + world.playSound(bot.getLocation(), Sound.ENTITY_WIND_CHARGE_WIND_BURST, SoundCategory.PLAYERS, 1, 1); + world.spawnParticle(Particle.GUST_EMITTER_SMALL, bot.getLocation(), 1, 0, 0, 0, 0.1); + } + return true; + } + private boolean tryWindchargeMaceAttack(Terminator bot, LivingEntity target) { + return tryWindchargeMaceAttack(bot, target, true); + } + + private boolean tryWindchargeMaceAttack(Terminator bot, LivingEntity target, boolean attemptwindcharge) { LivingEntity botEntity = bot.getBukkitEntity(); if (botEntity == null) { return false; @@ -1422,35 +1494,20 @@ public class LegacyAgent extends Agent { return false; } - if (!bot.isBotOnGround() && Math.random() >= 0.5) return false; - - // Face the ground at own position to launch upward - bot.look(org.bukkit.block.BlockFace.DOWN); - - // Jump boost from windcharge with higher velocity - bot.setItem(new ItemStack(Material.WIND_CHARGE, 1)); - Vector jumpVel = new Vector(0, 0.6, 0); - Vector cvel = bot.getVelocity().add(jumpVel); - cvel.setX(clamp(cvel.getX(), -0.05, 0.05)); - cvel.setZ(clamp(cvel.getZ(), -0.05, 0.05)); - bot.setVelocity(cvel); - World world = bot.getLocation().getWorld(); - if (world != null) { - world.playSound(bot.getLocation(), Sound.ENTITY_WIND_CHARGE_WIND_BURST, SoundCategory.PLAYERS, 1, 1); - world.spawnParticle(Particle.GUST_EMITTER_SMALL, target.getLocation(), 1, 0, 0, 0, 0.1); - } + if (attemptwindcharge) + if (!useWindcharge(bot)) return false; Bukkit.getScheduler().scheduleAsyncDelayedTask(plugin, () -> { while (!bot.isBotOnGround() && bot.getLocation().distanceSquared(target.getLocation()) > 3) {} Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> { - double falldist = -(bot.getVelocity().getY()*10); // CERTAINLY not the best way but meh + double falldist = -(bot.getVelocity().getY()*15); // CERTAINLY not the best way but meh //Bukkit.getLogger().info("fall dist: "+falldist+" cvy: "+bot.getVelocity().getY()); - if (bot.isBotOnGround()) { + /*if (bot.isBotOnGround()) { //Bukkit.getLogger().info("Bot -> ground, no mace"); return; - } + }*/ double extradmg = 0; if (falldist >= 1.5) { @@ -1463,6 +1520,9 @@ public class LegacyAgent extends Agent { bot.setItem(bot.getDefaultItem()); bot.faceLocation(target.getLocation()); bot.punch(); + + World world = bot.getBukkitEntity().getWorld(); + if (bot.getLocation().distanceSquared(target.getLocation()) <= 5) { double exdmg = extradmg; Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> { @@ -1484,7 +1544,7 @@ public class LegacyAgent extends Agent { //Bukkit.getLogger().info("Bot out of range."); } }, 0); - }, 8); + }, attemptwindcharge ? 8 : 0); return true; } diff --git a/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log b/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log index 93884bb..f283730 100644 --- a/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log +++ b/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log @@ -1,2 +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 1622.09 ms. +[INFO] Finished after 1790.62 ms. diff --git a/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock b/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock index 06da579..fb24916 100644 Binary files a/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock and b/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock differ diff --git a/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock index e5a946d..557426b 100644 Binary files a/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/buildSrc/.gradle/file-system.probe b/buildSrc/.gradle/file-system.probe index 7d2763c..6a37809 100644 Binary files a/buildSrc/.gradle/file-system.probe and b/buildSrc/.gradle/file-system.probe differ