mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 01:32:19 +00:00
1.7.10 Files
Files added
This commit is contained in:
1 parent
393ea9b463
commit
a31efb2dc3
1768 files changed
+84831
No files matched your search
@@ -0,0 +1,25 @@
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user