Пример #1
0
        /// <summary>
        /// Returns whether the EntityAIBase should begin execution.
        /// </summary>
        public override bool ShouldExecute()
        {
            if (Entity.GetAge() >= 100)
            {
                return(false);
            }

            if (Entity.GetRNG().Next(120) != 0)
            {
                return(false);
            }

            Vec3D vec3d = RandomPositionGenerator.Func_48622_a(Entity, 10, 7);

            if (vec3d == null)
            {
                return(false);
            }
            else
            {
                Field_46098_b = vec3d.XCoord;
                Field_46099_c = vec3d.YCoord;
                Field_46097_d = vec3d.ZCoord;
                return(true);
            }
        }
        /// <summary>
        /// Returns whether the EntityAIBase should begin execution.
        /// </summary>
        public override bool ShouldExecute()
        {
            if (Field_48316_a.GetAITarget() == null)
            {
                return(false);
            }

            Vec3D vec3d = RandomPositionGenerator.Func_48622_a(Field_48316_a, 5, 4);

            if (vec3d == null)
            {
                return(false);
            }
            else
            {
                Field_48315_c = vec3d.XCoord;
                Field_48312_d = vec3d.YCoord;
                Field_48313_e = vec3d.ZCoord;
                return(true);
            }
        }