package common.ai;

import common.entity.npc.EntityNPC;

public class EntityAILookAtTalkingPlayer extends EntityAIWatchClosest
{
    private final EntityNPC npc;

    public EntityAILookAtTalkingPlayer(EntityNPC npc)
    {
        super(npc, null, 8.0F);
        this.npc = npc;
    }
    
    public boolean shouldExecute()
    {
        if (this.npc.isTalking() && this.npc.getAttackTarget() == null)
        {
            this.closestEntity = this.npc.getTalking();
            return true;
        }
        else
        {
            return false;
        }
    }
}
