mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 18:57:32 +00:00
Fix Attack Invisible
This commit is contained in:
1 parent
ada1409f58
commit
f2a87243d5
1 file changed
+1
-1
@@ -34,7 +34,7 @@ public class NPCAttackSelector implements IEntitySelector {
|
||||
if (this.npc.ais.directLOS && !this.npc.getEntitySenses().canSee(entity))
|
||||
return false;
|
||||
|
||||
if (!npc.stats.attackInvisible && ((EntityLivingBase) entity).isPotionActive(Potion.invisibility) && npc.getDistanceSqToEntity(entity) < 9)
|
||||
if (!npc.stats.attackInvisible && ((EntityLivingBase) entity).isPotionActive(Potion.invisibility) && !npc.isInRange(entity, 3.0))
|
||||
return false;
|
||||
|
||||
//prevent the npc from going on an endless killing spree
|
||||
|
||||
Reference in new issue
Block a user