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 java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private long
endTimestamp
protected java.util.Map<MemoryModuleType<?>,MemoryModuleStatus>
entryCondition
private int
maxDuration
private int
minDuration
private Task.Status
status
-
Constructor Summary
Constructors Constructor Description Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51504_1_)
Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51505_1_, int p_i51505_2_)
Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51506_1_, int p_i51506_2_, int p_i51506_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canStillUse(ServerWorld p_212834_1_, E p_212834_2_, long p_212834_3_)
protected boolean
checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
void
doStop(ServerWorld p_220380_1_, E p_220380_2_, long p_220380_3_)
Task.Status
getStatus()
private boolean
hasRequiredMemories(E p_220382_1_)
protected void
start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
protected void
stop(ServerWorld p_212835_1_, E p_212835_2_, long p_212835_3_)
protected void
tick(ServerWorld p_212833_1_, E p_212833_2_, long p_212833_3_)
void
tickOrStop(ServerWorld p_220377_1_, E p_220377_2_, long p_220377_3_)
protected boolean
timedOut(long p_220383_1_)
java.lang.String
toString()
boolean
tryStart(ServerWorld p_220378_1_, E p_220378_2_, long p_220378_3_)
-
-
-
Field Detail
-
entryCondition
protected final java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> entryCondition
-
status
private Task.Status status
-
endTimestamp
private long endTimestamp
-
minDuration
private final int minDuration
-
maxDuration
private final int maxDuration
-
-
Constructor Detail
-
Task
public Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51504_1_)
-
Task
public Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51505_1_, int p_i51505_2_)
-
Task
public Task(java.util.Map<MemoryModuleType<?>,MemoryModuleStatus> p_i51506_1_, int p_i51506_2_, int p_i51506_3_)
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hasRequiredMemories
private boolean hasRequiredMemories(E p_220382_1_)
-
-