Mob Targeting

Allow mobs to target AIs and vice versa
This commit is contained in:
ThisTestUser
2021-08-25 12:30:03 -04:00
parent c5900773ba
commit 0ea15caacd
6 changed files with 129 additions and 57 deletions

View File

@@ -75,6 +75,8 @@ public class Bot extends EntityPlayer {
private byte noFallTicks;
private final Vector offset;
public static boolean mobTargeting;
private Bot(MinecraftServer minecraftServer, WorldServer worldServer, GameProfile profile, PlayerInteractManager manager) {
super(minecraftServer, worldServer, profile, manager);
@@ -117,7 +119,10 @@ public class Bot extends EntityPlayer {
bot.setLocation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
bot.getBukkitEntity().setNoDamageTicks(0);
nmsWorld.addEntity(bot);
if(mobTargeting)
nmsWorld.addPlayerJoin(bot);
else
nmsWorld.addEntity(bot);
bot.renderAll();