mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Fixed flying aggro range now working for larger aggro ranges
This commit is contained in:
1 parent
90eec7a57b
commit
29db4bfe33
1 file changed
+4
@@ -1,10 +1,12 @@
|
||||
package noppes.npcs.ai;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.constants.AiMutex;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
@@ -55,7 +57,9 @@ public class EntityAIAttackTarget extends EntityAIBase
|
||||
}
|
||||
else{
|
||||
this.entityTarget = entitylivingbase;
|
||||
this.attacker.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(((EntityNPCInterface) this.attacker).stats.aggroRange);
|
||||
this.entityPathEntity = this.attacker.getNavigator().getPathToEntityLiving(entitylivingbase);
|
||||
this.attacker.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(CustomNpcs.NpcNavRange);
|
||||
return this.entityPathEntity != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user