Files
CustomNPC-Plus/src/main/java/noppes/npcs/ai/EntityAIWorldLines.java
T
KAMKEEL a31efb2dc3 1.7.10 Files
Files added
2018-09-13 12:03:28 -04:00

26 lines
634 B
Java

package noppes.npcs.ai;
import net.minecraft.entity.ai.EntityAIBase;
import noppes.npcs.constants.AiMutex;
import noppes.npcs.entity.EntityNPCInterface;
public class EntityAIWorldLines extends EntityAIBase {
private EntityNPCInterface npc;
public EntityAIWorldLines(EntityNPCInterface npc){
this.npc = npc;
this.setMutexBits(AiMutex.PASSIVE);
}
@Override
public boolean shouldExecute() {
return !npc.isAttacking() && !npc.isKilled() && npc.advanced.hasWorldLines() && npc.getRNG().nextInt(1900) == 1;
}
public void startExecuting()
{
npc.saySurrounding(npc.advanced.getWorldLine());
}
}