Gaia guardian minor fixes: make anti-flight smarter, and search for initial player aggro further in the entire arena. Closes #2304

This commit is contained in:
Vincent Lee committed 2018-03-16 17:50:38 -05:00
1 parent 51e8c30c7b
commit 4f4971ca73
1 file changed
+2 -3
@@ -688,7 +688,8 @@ public class EntityDoppleganger extends EntityLiving implements IBotaniaBoss {
if (world.isRemote) {
particles();
EntityPlayer player = Botania.proxy.getClientPlayer();
player.capabilities.isFlying = player.capabilities.isFlying && player.capabilities.isCreativeMode;
if(getPlayersAround().contains(player))
player.capabilities.isFlying = player.capabilities.isFlying && player.capabilities.isCreativeMode;
return;
}
@@ -814,8 +815,6 @@ public class EntityDoppleganger extends EntityLiving implements IBotaniaBoss {
if(spawnMissiles)
spawnMissile();
} else {
float range = 3F;
players = world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - range, posY - range, posZ - range, posX + range, posY + range, posZ + range));
if(!players.isEmpty())
damageEntity(DamageSource.causePlayerDamage(players.get(0)), 0);
}