Exemplo n.º 1
0
        /// <summary>
        /// Returns whether the EntityAIBase should begin execution.
        /// </summary>
        public override bool ShouldExecute()
        {
            if (!TheEntity.IsTamed())
            {
                return(false);
            }

            if (TheEntity.IsInWater())
            {
                return(false);
            }

            if (!TheEntity.OnGround)
            {
                return(false);
            }

            EntityLiving entityliving = TheEntity.GetOwner();

            if (entityliving == null)
            {
                return(true);
            }

            if (TheEntity.GetDistanceSqToEntity(entityliving) < 144D && entityliving.GetAITarget() != null)
            {
                return(false);
            }
            else
            {
                return(Field_48408_b);
            }
        }
        /// <summary>
        /// Returns whether the EntityAIBase should begin execution.
        /// </summary>
        public override bool ShouldExecute()
        {
            if (!Field_48394_a.IsTamed())
            {
                return(false);
            }

            EntityLiving entityliving = Field_48394_a.GetOwner();

            if (entityliving == null)
            {
                return(false);
            }
            else
            {
                Field_48393_b = entityliving.GetAITarget();
                return(Func_48376_a(Field_48393_b, false));
            }
        }