Esempio n. 1
0
 /// <summary>
 /// Resets the task
 /// </summary>
 public override void ResetTask()
 {
     if (Field_48328_i)
     {
         TargetDoor.OnPoweredBlockChange(TheEntity.WorldObj, EntityPosX, EntityPosY, EntityPosZ, false);
     }
 }
Esempio n. 2
0
 /// <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));
     }
 }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
 /// <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);
 }