/// <summary> /// Resets the task /// </summary> public override void ResetTask() { if (Field_48328_i) { TargetDoor.OnPoweredBlockChange(TheEntity.WorldObj, EntityPosX, EntityPosY, EntityPosZ, false); } }
/// <summary> /// Returns whether the EntityAIBase should begin execution. /// </summary> public override bool ShouldExecute() { if (!base.ShouldExecute()) { return(false); } else { return(!TargetDoor.Func_48213_h(TheEntity.WorldObj, EntityPosX, EntityPosY, EntityPosZ)); } }
/// <summary> /// Returns whether an in-progress EntityAIBase should continue executing /// </summary> public override bool ContinueExecuting() { double d = TheEntity.GetDistanceSq(EntityPosX, EntityPosY, EntityPosZ); return(Field_48329_i >= 0 && !TargetDoor.Func_48213_h(TheEntity.WorldObj, EntityPosX, EntityPosY, EntityPosZ) && d < 4D); }
/// <summary> /// Execute a one shot task or start executing a continuous task /// </summary> public override void StartExecuting() { Field_48327_j = 20; TargetDoor.OnPoweredBlockChange(TheEntity.WorldObj, EntityPosX, EntityPosY, EntityPosZ, true); }