add functionality for maces
This commit is contained in:
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.
11
.idea/gradle.xml
generated
Normal file
11
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="21" />
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
81
.idea/workspace.xml
generated
Normal file
81
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="5102ee95-ea95-49aa-8d82-42bb833a7600" name="Changes" comment="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/checksums/checksums.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/checksums/checksums.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/checksums/sha1-checksums.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/checksums/sha1-checksums.bin" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/executionHistory/executionHistory.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/executionHistory/executionHistory.bin" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/executionHistory/executionHistory.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/fileHashes.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/fileHashes.bin" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/fileHashes.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/resourceHashesCache.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/9.0.0/fileHashes/resourceHashesCache.bin" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gradle/file-system.probe" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/file-system.probe" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/Terminator.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/Terminator.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/botagent/BotAgent.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/botagent/BotAgent.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$1.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent$2.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/utils/ItemUtils.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/bin/main/net/nuggetmc/tplus/api/utils/ItemUtils.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/Terminator.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/Terminator.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/botagent/BotAgent.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/botagent/BotAgent.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/agent/legacyagent/LegacyAgent.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/utils/ItemUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-API/src/main/java/net/nuggetmc/tplus/api/utils/ItemUtils.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/.gradle/caches/paperweight/taskCache/reobfJar.log" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/Bot.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/Bot.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/BotManagerImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/BotManagerImpl.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/CitizensNPC.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/bot/CitizensNPC.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/utils/Debugger.class" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/bin/main/net/nuggetmc/tplus/utils/Debugger.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/Bot.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/Bot.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/BotManagerImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/BotManagerImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/CitizensNPC.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/bot/CitizensNPC.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/utils/Debugger.java" beforeDir="false" afterPath="$PROJECT_DIR$/TerminatorPlus-Plugin/src/main/java/net/nuggetmc/tplus/utils/Debugger.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/buildSrc/.gradle/9.0.0/executionHistory/executionHistory.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/buildSrc/.gradle/file-system.probe" beforeDir="false" afterPath="$PROJECT_DIR$/buildSrc/.gradle/file-system.probe" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo"><![CDATA[{
|
||||||
|
"customColor": "",
|
||||||
|
"associatedIndex": 3
|
||||||
|
}]]></component>
|
||||||
|
<component name="ProjectId" id="3AUBaHjRoLsKlorfhrHm7B6wL6W" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
|
"keyToString": {
|
||||||
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"RunOnceActivity.git.unshallow": "true"
|
||||||
|
}
|
||||||
|
}]]></component>
|
||||||
|
<component name="SharedIndexes">
|
||||||
|
<attachedChunks>
|
||||||
|
<set>
|
||||||
|
<option value="bundled-jdk-30f59d01ecdd-2fc7cc6b9a17-intellij.indexing.shared.core-IU-253.30387.90" />
|
||||||
|
</set>
|
||||||
|
</attachedChunks>
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="5102ee95-ea95-49aa-8d82-42bb833a7600" name="Changes" comment="" />
|
||||||
|
<created>1772637332226</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1772637332226</updated>
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
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.
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.
BIN
TerminatorPlus-API/build/libs/TerminatorPlus-API-4.5.1-BETA.jar
Normal file
BIN
TerminatorPlus-API/build/libs/TerminatorPlus-API-4.5.1-BETA.jar
Normal file
Binary file not shown.
Binary file not shown.
2
TerminatorPlus-API/build/tmp/jar/MANIFEST.MF
Normal file
2
TerminatorPlus-API/build/tmp/jar/MANIFEST.MF
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
|
||||||
@@ -18,7 +18,6 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public interface Terminator {
|
public interface Terminator {
|
||||||
|
|
||||||
String getBotName();
|
String getBotName();
|
||||||
|
|
||||||
int getEntityId();
|
int getEntityId();
|
||||||
@@ -74,6 +73,7 @@ public interface Terminator {
|
|||||||
void faceLocation(Location location);
|
void faceLocation(Location location);
|
||||||
|
|
||||||
void attack(Entity target);
|
void attack(Entity target);
|
||||||
|
void attack(Entity target, double extra);
|
||||||
|
|
||||||
void attemptBlockPlace(Location loc, Material type, boolean down);
|
void attemptBlockPlace(Location loc, Material type, boolean down);
|
||||||
|
|
||||||
@@ -103,6 +103,8 @@ public interface Terminator {
|
|||||||
|
|
||||||
void setDefaultItem(ItemStack item);
|
void setDefaultItem(ItemStack item);
|
||||||
|
|
||||||
|
ItemStack getDefaultItem();
|
||||||
|
|
||||||
Vector getOffset();
|
Vector getOffset();
|
||||||
|
|
||||||
Vector getVelocity();
|
Vector getVelocity();
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ import net.nuggetmc.tplus.api.utils.MathUtils;
|
|||||||
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.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import net.nuggetmc.tplus.api.event.BotDeathEvent;
|
|||||||
import net.nuggetmc.tplus.api.event.BotFallDamageEvent;
|
import net.nuggetmc.tplus.api.event.BotFallDamageEvent;
|
||||||
import net.nuggetmc.tplus.api.event.TerminatorLocateTargetEvent;
|
import net.nuggetmc.tplus.api.event.TerminatorLocateTargetEvent;
|
||||||
import net.nuggetmc.tplus.api.utils.BotUtils;
|
import net.nuggetmc.tplus.api.utils.BotUtils;
|
||||||
|
import net.nuggetmc.tplus.api.utils.ItemUtils;
|
||||||
import net.nuggetmc.tplus.api.utils.MathUtils;
|
import net.nuggetmc.tplus.api.utils.MathUtils;
|
||||||
import net.nuggetmc.tplus.api.utils.PlayerUtils;
|
import net.nuggetmc.tplus.api.utils.PlayerUtils;
|
||||||
import org.bukkit.*;
|
import org.bukkit.*;
|
||||||
@@ -1394,12 +1395,111 @@ public class LegacyAgent extends Agent {
|
|||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private double clamp(double value, double min, double max) {
|
||||||
|
return Math.max(min, Math.min(max, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private double getdistfromfloor(LivingEntity entity) {
|
||||||
|
return Math.abs(entity.getWorld().getHighestBlockYAt(entity.getLocation()) - entity.getLocation().getY());
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private boolean tryWindchargeMaceAttack(Terminator bot, LivingEntity target) {
|
||||||
|
LivingEntity botEntity = bot.getBukkitEntity();
|
||||||
|
if (botEntity == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get inventory - Citizens NPCs should have inventory even if not Player instance
|
||||||
|
ItemStack mainHand;
|
||||||
|
if (botEntity instanceof Player player) {
|
||||||
|
mainHand = player.getInventory().getItemInMainHand();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if bot has a mace in main hand
|
||||||
|
if (bot.getDefaultItem().getType() != Material.MACE && mainHand.getType() != Material.MACE) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
//Bukkit.getLogger().info("fall dist: "+falldist+" cvy: "+bot.getVelocity().getY());
|
||||||
|
|
||||||
|
if (bot.isBotOnGround()) {
|
||||||
|
//Bukkit.getLogger().info("Bot -> ground, no mace");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
double extradmg = 0;
|
||||||
|
if (falldist >= 1.5) {
|
||||||
|
extradmg += clamp(falldist,0,3)*4; // first 3 blocks handling
|
||||||
|
falldist = clamp(falldist-3,0,Double.MAX_VALUE);
|
||||||
|
extradmg += clamp(falldist,0,5)*2; // next 5 blocks handling
|
||||||
|
falldist = clamp(falldist-5,0,Double.MAX_VALUE);
|
||||||
|
extradmg += falldist; // remaining blocks handling
|
||||||
|
}
|
||||||
|
bot.setItem(bot.getDefaultItem());
|
||||||
|
bot.faceLocation(target.getLocation());
|
||||||
|
bot.punch();
|
||||||
|
if (bot.getLocation().distanceSquared(target.getLocation()) <= 5) {
|
||||||
|
double exdmg = extradmg;
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
||||||
|
bot.attack(target, exdmg); // apply damage only if within range
|
||||||
|
// effect stuff
|
||||||
|
if (world != null && exdmg > 0) {
|
||||||
|
bot.setVelocity(bot.getVelocity().setY(0.1)); // no fall damage
|
||||||
|
|
||||||
|
// schedule next mace attempt to make a streak potentially
|
||||||
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {tryWindchargeMaceAttack(bot, target);}, 0);
|
||||||
|
|
||||||
|
world.playSound(bot.getLocation(), Sound.ITEM_MACE_SMASH_GROUND, SoundCategory.PLAYERS, 1, 1);
|
||||||
|
world.spawnParticle(Particle.EXPLOSION, target.getLocation(), 10, 0.5, 0.5, 0.5, 0.1);
|
||||||
|
} else {
|
||||||
|
//Bukkit.getLogger().info("exdmg !> 0");
|
||||||
|
}
|
||||||
|
}, 1);
|
||||||
|
} else {
|
||||||
|
//Bukkit.getLogger().info("Bot out of range.");
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
}, 8);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void attack(Terminator bot, LivingEntity target, Location loc) {
|
private void attack(Terminator bot, LivingEntity target, Location loc) {
|
||||||
if ((target instanceof Player && PlayerUtils.isInvincible(((Player) target).getGameMode())) || target.getNoDamageTicks() >= 5 || loc.distance(target.getLocation()) >= 4)
|
if ((target instanceof Player && PlayerUtils.isInvincible(((Player) target).getGameMode())) || target.getNoDamageTicks() >= 5 || loc.distance(target.getLocation()) >= 4)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (tryWindchargeMaceAttack(bot, target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
bot.attack(target);
|
bot.attack(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setRegion(BoundingBox region, double regionWeightX, double regionWeightY, double regionWeightZ) {
|
public void setRegion(BoundingBox region, double regionWeightX, double regionWeightY, double regionWeightZ) {
|
||||||
this.region = region;
|
this.region = region;
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class ItemUtils {
|
|||||||
case IRON_SWORD:
|
case IRON_SWORD:
|
||||||
case DIAMOND_AXE:
|
case DIAMOND_AXE:
|
||||||
case NETHERITE_PICKAXE:
|
case NETHERITE_PICKAXE:
|
||||||
|
case MACE:
|
||||||
return 6;
|
return 6;
|
||||||
|
|
||||||
case DIAMOND_SWORD:
|
case DIAMOND_SWORD:
|
||||||
|
|||||||
@@ -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
|
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.
|
[INFO] Finished after 1622.09 ms.
|
||||||
|
|||||||
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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user