mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 16:12:17 +00:00
Check KO
This commit is contained in:
1 parent
0c48bac2ef
commit
83a07d8b1d
4 files changed
+20
-6
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package noppes.npcs.ai;
|
||||
|
||||
import kamkeel.addon.DBCAddon;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -111,7 +112,7 @@ public class CombatHandler {
|
||||
if(target == null || !target.isEntityAlive())
|
||||
return false;
|
||||
|
||||
if(target instanceof EntityPlayer && ((EntityPlayer)target).capabilities.disableDamage)
|
||||
if(target instanceof EntityPlayer && (((EntityPlayer)target).capabilities.disableDamage || DBCAddon.instance.isKO(npc, (EntityPlayer) target)))
|
||||
return false;
|
||||
|
||||
return npc.isInRange(target, npc.stats.aggroRange);
|
||||
|
||||
Reference in new issue
Block a user