add functionality for maces
This commit is contained in:
@@ -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 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.
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.
3
TerminatorPlus-Plugin/build/tmp/jar/MANIFEST.MF
Normal file
3
TerminatorPlus-Plugin/build/tmp/jar/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
paperweight-mappings-namespace: mojang
|
||||
|
||||
@@ -345,6 +345,11 @@ public class Bot extends ServerPlayer implements Terminator {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDefaultItem() {
|
||||
return defaultItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getTargetPlayer() {
|
||||
return targetPlayer;
|
||||
@@ -367,7 +372,8 @@ public class Bot extends ServerPlayer implements Terminator {
|
||||
plugin.getManager().getAgent().onFallDamage(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
hurt(damageSources().fall(), (float) Math.pow(3.6, -oldVelocity.getY()));
|
||||
Bukkit.getLogger().info("clutch failed");
|
||||
//hurt(damageSources().fall(), (float) Math.pow(3.6, -oldVelocity.getY()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,17 +511,22 @@ public class Bot extends ServerPlayer implements Terminator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(org.bukkit.entity.Entity entity) {
|
||||
public void attack(org.bukkit.entity.Entity entity, double extra) {
|
||||
faceLocation(entity.getLocation());
|
||||
punch();
|
||||
|
||||
double damage = ItemUtils.getLegacyAttackDamage(defaultItem);
|
||||
double damage = ItemUtils.getLegacyAttackDamage(defaultItem)+extra;
|
||||
|
||||
if (entity instanceof Damageable) {
|
||||
((Damageable) entity).damage(damage, getBukkitEntity());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(org.bukkit.entity.Entity entity) {
|
||||
attack(entity, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void punch() {
|
||||
swing(InteractionHand.MAIN_HAND);
|
||||
|
||||
@@ -17,7 +17,6 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
@@ -284,17 +283,4 @@ public class BotManagerImpl implements BotManager, Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerDeath(PlayerDeathEvent event) {
|
||||
Player player = event.getEntity();
|
||||
Entity killer = player.getKiller();
|
||||
|
||||
if (killer != null) {
|
||||
Terminator bot = getBot(killer.getEntityId());
|
||||
if (bot != null) {
|
||||
bot.incrementKills();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,11 @@ public class CitizensNPC implements Terminator {
|
||||
return citizensNPC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDefaultItem() {
|
||||
return defaultItem;
|
||||
}
|
||||
|
||||
public static CitizensNPC createNPC(Location loc, String name) {
|
||||
return createNPC(loc, name, name);
|
||||
}
|
||||
@@ -204,7 +209,7 @@ public class CitizensNPC implements Terminator {
|
||||
|
||||
@Override
|
||||
public boolean isFalling() {
|
||||
return velocity.getY() < -0.8;
|
||||
return velocity.getY() < 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -318,18 +323,22 @@ public class CitizensNPC implements Terminator {
|
||||
look(location.toVector().subtract(entity.getLocation().toVector()), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void attack(Entity target) {
|
||||
public void attack(Entity target, double extra) {
|
||||
faceLocation(target.getLocation());
|
||||
punch();
|
||||
|
||||
double damage = ItemUtils.getLegacyAttackDamage(defaultItem);
|
||||
double damage = ItemUtils.getLegacyAttackDamage(defaultItem)+extra;
|
||||
|
||||
if (target instanceof Damageable) {
|
||||
((Damageable) target).damage(damage, getBukkitEntity());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void attack(Entity target) {
|
||||
attack(target,0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attemptBlockPlace(Location loc, Material type, boolean down) {
|
||||
@@ -527,8 +536,13 @@ public class CitizensNPC implements Terminator {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
if (!isBotAlive()) return;
|
||||
|
||||
if (!isBotAlive()) {
|
||||
this.removeBot();
|
||||
return;
|
||||
}
|
||||
|
||||
getBukkitEntity().setFallDistance(0);
|
||||
|
||||
aliveTicks++;
|
||||
|
||||
if (jumpTicks > 0) --jumpTicks;
|
||||
@@ -596,7 +610,7 @@ public class CitizensNPC implements Terminator {
|
||||
}
|
||||
|
||||
private void doTick() {
|
||||
// Can be extended for additional tick logic
|
||||
// Custom behavior can be implemented here or in a trait
|
||||
}
|
||||
|
||||
private void fallDamageCheck() {
|
||||
@@ -606,10 +620,11 @@ public class CitizensNPC implements Terminator {
|
||||
agent.onFallDamage(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
Bukkit.getLogger().info("clutch failed");
|
||||
LivingEntity entity = getBukkitEntity();
|
||||
if (entity != null && entity instanceof Damageable damageable) {
|
||||
float damage = (float) Math.pow(3.6, -oldVelocity.getY());
|
||||
damageable.damage(damage);
|
||||
//damageable.damage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.nuggetmc.tplus.api.agent.legacyagent.ai.IntelligenceAgent;
|
||||
import net.nuggetmc.tplus.api.agent.legacyagent.ai.NeuralNetwork;
|
||||
import net.nuggetmc.tplus.api.utils.DebugLogUtils;
|
||||
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.bot.CitizensNPC;
|
||||
import net.nuggetmc.tplus.command.commands.AICommand;
|
||||
|
||||
Reference in New Issue
Block a user