Class Task<E extends LivingEntity>

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
Direct Known Subclasses:
AdmireItemTask, AnimalBreedTask, AssignProfessionTask, AttackStrafingTask, AttackTargetTask, BeginRaidTask, BoneMealCropsTask, CelebrateRaidVictoryTask, ChangeJobTask, ChildFollowNearestAdultTask, ClearHurtTask, CongregateTask, CreateBabyVillagerTask, DummyTask, EndAttackTask, ExpireHidingTask, ExpirePOITask, FarmTask, FindHidingPlaceTask, FindInteractionAndLookTargetTask, FindJobTask, FindNewAttackTargetTask, FindPotentialJobTask, FindWalkTargetTask, FinishedHuntTask, ForgetAdmiredItemTask, ForgetAttackTargetTask, ForgetRaidTask, GatherPOITask, GetAngryTask, GiveHeroGiftsTask, HideFromRaidOnBellRingTask, HuntCelebrationTask, InteractWithDoorTask, InteractWithEntityTask, JumpOnBedTask, LookAtEntityTask, LookTask, MoveToSkylightTask, MoveToTargetTask, MultiTask, PanicTask, PickupWantedItemTask, PiglinIdleActivityTask, PredicateTask, RandomlyStopAttackingTask, RideEntityTask, RingBellTask, RunAwayTask, RunSometimesTask, ShareItemsTask, ShootTargetTask, ShowWaresTask, SleepAtHomeTask, SpawnGolemTask, StartAdmiringItemTask, StartHuntTask, StayNearPointTask, StopReachingItemTask, StopRidingEntityTask, SupplementedTask, SwimTask, SwitchVillagerJobTask, TradeTask, UpdateActivityTask, WakeUpTask, WalkRandomlyInsideTask, WalkRandomlyTask, WalkToHouseTask, WalkToPOITask, WalkToTargetTask, WalkToVillagerBabiesTask, WalkTowardsLookTargetTask, WalkTowardsPosTask, WalkTowardsRandomSecondaryPosTask, WorkTask

public abstract class Task<E extends LivingEntity> extends Object
  • Field Details

    • entryCondition

      protected final Map<MemoryModuleType<?>,MemoryModuleStatus> entryCondition
    • status

      private Task.Status status
    • endTimestamp

      private long endTimestamp
    • minDuration

      private final int minDuration
    • maxDuration

      private final int maxDuration
  • Constructor Details

  • Method Details

    • getStatus

      public Task.Status getStatus()
    • tryStart

      public final boolean tryStart(ServerWorld p_220378_1_, E p_220378_2_, long p_220378_3_)
    • start

      protected void start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
    • tickOrStop

      public final void tickOrStop(ServerWorld p_220377_1_, E p_220377_2_, long p_220377_3_)
    • tick

      protected void tick(ServerWorld p_212833_1_, E p_212833_2_, long p_212833_3_)
    • doStop

      public final void doStop(ServerWorld p_220380_1_, E p_220380_2_, long p_220380_3_)
    • stop

      protected void stop(ServerWorld p_212835_1_, E p_212835_2_, long p_212835_3_)
    • canStillUse

      protected boolean canStillUse(ServerWorld p_212834_1_, E p_212834_2_, long p_212834_3_)
    • timedOut

      protected boolean timedOut(long p_220383_1_)
    • checkExtraStartConditions

      protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasRequiredMemories

      private boolean hasRequiredMemories(E p_220382_1_)