mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
Apple Attributes for Items if DBC is not available, Resistances Always
This commit is contained in:
1 parent
6c1330552b
commit
710cb04f8d
1 file changed
+5
-6
@@ -565,13 +565,12 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
} else if (attackingEntity instanceof EntityPlayer && faction.isFriendlyToPlayer((EntityPlayer) attackingEntity))
|
||||
return false;
|
||||
|
||||
// Attribute + Resistances
|
||||
if(!DBCAddon.IsAvailable()){
|
||||
if(attackingEntity instanceof EntityPlayer)
|
||||
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
|
||||
// Attribute
|
||||
if(!DBCAddon.IsAvailable() && attackingEntity instanceof EntityPlayer)
|
||||
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
|
||||
|
||||
i = stats.resistances.applyResistance(damagesource, i);
|
||||
}
|
||||
// Resistances
|
||||
i = stats.resistances.applyResistance(damagesource, i);
|
||||
|
||||
NpcEvent.DamagedEvent event = new NpcEvent.DamagedEvent(this.wrappedNPC, attackingEntity, i, damagesource);
|
||||
if (EventHooks.onNPCDamaged(this, event) || isKilled())
|
||||
|
||||
Reference in new issue
Block a user