Original CNPC Branch

This commit is contained in:
KAMKEEL committed 2022-02-05 18:02:35 -05:00
1 parent 6d6daeb345
commit 39b7f805b3
1227 files changed
+2259 -39282

No files matched your search

@@ -1,12 +1,10 @@
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;
@@ -57,9 +55,7 @@ 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;
}
}