Nearest raider option
This commit is contained in:
@@ -7,6 +7,7 @@ public enum EnumTargetGoal {
|
|||||||
NEAREST_VULNERABLE_PLAYER("Locate the nearest real player that is in either Survival or Adventure mode."),
|
NEAREST_VULNERABLE_PLAYER("Locate the nearest real player that is in either Survival or Adventure mode."),
|
||||||
NEAREST_PLAYER("Locate the nearest real online player, despite the gamemode."),
|
NEAREST_PLAYER("Locate the nearest real online player, despite the gamemode."),
|
||||||
NEAREST_HOSTILE("Locate the nearest hostile entity."),
|
NEAREST_HOSTILE("Locate the nearest hostile entity."),
|
||||||
|
NEAREST_RAIDER("Locate the nearest raider."),
|
||||||
NEAREST_MOB("Locate the nearest mob."),
|
NEAREST_MOB("Locate the nearest mob."),
|
||||||
NEAREST_BOT("Locate the nearest bot."),
|
NEAREST_BOT("Locate the nearest bot."),
|
||||||
NEAREST_BOT_DIFFER("Locate the nearest bot with a different username."),
|
NEAREST_BOT_DIFFER("Locate the nearest bot with a different username."),
|
||||||
@@ -20,6 +21,7 @@ public enum EnumTargetGoal {
|
|||||||
this.put("nearestvulnerableplayer", NEAREST_VULNERABLE_PLAYER);
|
this.put("nearestvulnerableplayer", NEAREST_VULNERABLE_PLAYER);
|
||||||
this.put("nearestplayer", NEAREST_PLAYER);
|
this.put("nearestplayer", NEAREST_PLAYER);
|
||||||
this.put("nearesthostile", NEAREST_HOSTILE);
|
this.put("nearesthostile", NEAREST_HOSTILE);
|
||||||
|
this.put("nearestraider", NEAREST_RAIDER);
|
||||||
this.put("nearestmob", NEAREST_MOB);
|
this.put("nearestmob", NEAREST_MOB);
|
||||||
this.put("nearestbot", NEAREST_BOT);
|
this.put("nearestbot", NEAREST_BOT);
|
||||||
this.put("nearestbotdiffer", NEAREST_BOT_DIFFER);
|
this.put("nearestbotdiffer", NEAREST_BOT_DIFFER);
|
||||||
|
|||||||
@@ -1463,6 +1463,16 @@ public class LegacyAgent extends Agent {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NEAREST_RAIDER: {
|
||||||
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
|
if ((entity instanceof Raider || (entity instanceof Vex vex && vex.getSummoner() instanceof Raider)) && validateCloserEntity(entity, loc, result)) {
|
||||||
|
result = entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NEAREST_MOB: {
|
case NEAREST_MOB: {
|
||||||
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
for (LivingEntity entity : bot.getBukkitEntity().getWorld().getLivingEntities()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user