Class Task<E extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
- Direct Known Subclasses:
AdmireItemTask,AdmireItemTimeLimitTask,AttackTask,BoneMealTask,BreedTask,CelebrateRaidWinTask,class_5753,class_5754,class_5756,class_5769,class_5770,CompositeTask,ConditionalTask,CrossbowAttackTask,DefeatTargetTask,EndRaidTask,FarmerVillagerTask,FindEntityTask,FindInteractionTargetTask,FindPointOfInterestTask,FindWalkTargetTask,FollowCustomerTask,FollowMobTask,ForgetAngryAtTargetTask,ForgetAttackTargetTask,ForgetBellRingTask,ForgetCompletedPointOfInterestTask,ForgetTask,GatherItemsVillagerTask,GiveGiftsToHeroTask,GoToCelebrateTask,GoToIfNearbyTask,GoToNearbyPositionTask,GoToPointOfInterestTask,GoToRememberedPositionTask,GoToSecondaryPositionTask,GoTowardsLookTarget,GoToWorkTask,HideInHomeTask,HideWhenBellRingsTask,HoldTradeOffersTask,HuntFinishTask,HuntHoglinTask,JumpInBedTask,LookAroundTask,LoseJobOnSiteLossTask,MeetVillagerTask,MeleeAttackTask,MemoryTransferTask,OpenDoorsTask,PacifyTask,PanicTask,PlayWithVillagerBabiesTask,RangedApproachTask,RemoveOffHandItemTask,RidingTask,RingBellTask,ScheduleActivityTask,SeekSkyTask,SleepTask,StartRaidTask,StartRidingTask,StayAboveWaterTask,StopPanickingTask,StrollTask,TakeJobSiteTask,TimeLimitedTask,UpdateAttackTargetTask,VillagerBreedTask,VillagerWalkTowardsTask,VillagerWorkTask,WaitTask,WakeUpTask,WalkHomeTask,WalkToNearestVisibleWantedItemTask,WalkTowardClosestAdultTask,WalkTowardJobSiteTask,WanderAroundTask,WanderIndoorsTask,WantNewItemTask,WorkStationCompetitionTask
public abstract class Task<E extends LivingEntity> extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTask.Status -
Field Summary
Fields Modifier and Type Field Description private longendTimeprivate intmaxRunTimeprivate intminRunTimeprotected Map<MemoryModuleType<?>,MemoryModuleState>requiredMemoryStatesprivate Task.Statusstatus -
Constructor Summary
Constructors Constructor Description Task(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryState)Task(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryState, int runTime)Task(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryState, int minRunTime, int maxRunTime) -
Method Summary
Modifier and Type Method Description protected voidfinishRunning(ServerWorld world, E entity, long time)Task.StatusgetStatus()private booleanhasRequiredMemoryState(E e)protected booleanisTimeLimitExceeded(long time)protected voidkeepRunning(ServerWorld world, E entity, long time)protected voidrun(ServerWorld world, E entity, long time)protected booleanshouldKeepRunning(ServerWorld world, E entity, long time)protected booleanshouldRun(ServerWorld world, E entity)voidstop(ServerWorld world, E entity, long time)voidtick(ServerWorld world, E entity, long time)StringtoString()booleantryStarting(ServerWorld world, E entity, long time)
-
Field Details
-
requiredMemoryStates
-
status
-
endTime
private long endTime -
minRunTime
private final int minRunTime -
maxRunTime
private final int maxRunTime
-
-
Constructor Details
-
Task
-
Task
-
Task
public Task(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryState, int minRunTime, int maxRunTime)
-
-
Method Details