mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 05:15:11 +00:00
Fixed overloaded hurt(damage,entity) function not working when an entity is to be hurt by a player
This commit is contained in:
1 parent
06c730b166
commit
092b3ce0c1
3 files changed
+10
-4
No files matched your search
@@ -472,10 +472,10 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource damagesource, float i) {
|
||||
if (this.worldObj.isRemote || CustomNpcs.FreezeNPCs || damagesource.damageType.equals("inWall")){
|
||||
if (this.worldObj.isRemote || CustomNpcs.FreezeNPCs || (damagesource.damageType != null && damagesource.damageType.equals("inWall"))){
|
||||
return false;
|
||||
}
|
||||
if(damagesource.damageType.equals("outOfWorld") && isKilled()){
|
||||
if(damagesource.damageType != null && damagesource.damageType.equals("outOfWorld") && isKilled()){
|
||||
reset();
|
||||
}
|
||||
i = stats.resistances.applyResistance(damagesource, i);
|
||||
|
||||
Reference in new issue
Block a user