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

38 lines
817 B
Java

package noppes.npcs.ai;
import net.minecraft.entity.ai.EntityAIBase;
import noppes.npcs.entity.EntityNPCInterface;
public class EntityAIRole extends EntityAIBase {
private EntityNPCInterface npc;
public EntityAIRole(EntityNPCInterface npc){
this.npc = npc;
}
@Override
public boolean shouldExecute() {
if(npc.isKilled() || npc.roleInterface == null)
return false;
return npc.roleInterface.aiShouldExecute();
}
public void startExecuting()
{
npc.roleInterface.aiStartExecuting();
}
@Override
public boolean continueExecuting()
{
if(npc.isKilled() || npc.roleInterface == null)
return false;
return npc.roleInterface.aiContinueExecute();
}
public void updateTask(){
if(npc.roleInterface != null)
npc.roleInterface.aiUpdateTask();
}
}