net.minecraft.entity.ai.brain.task

public abstract class MultiTickTask<E extends LivingEntity>

implements Task<E>

net.minecraft.world.entity.ai.behavior.Behavior
net.minecraft.class_4097
net.minecraft.entity.ai.brain.task.MultiTickTask

Field summary

Modifier and TypeField
public static final int
DEFAULT_DURATION
field_30112
DEFAULT_RUN_TIME
protected final Map<MemoryModuleType<?>, MemoryModuleState>
entryCondition
field_19291
requiredMemoryStates
private MultiTickTask$Status
status
field_18333
status
private long
endTimestamp
field_18334
endTime
private final int
minDuration
field_18335
minRunTime
private final int
maxDuration
field_18336
maxRunTime

Constructor summary

ModifierConstructor
public (Map<MemoryModuleType<?>, MemoryModuleState> requiredMemoryState)
public (Map<MemoryModuleType<?>, MemoryModuleState> requiredMemoryState, int runTime)
public (Map<MemoryModuleType<?>, MemoryModuleState> requiredMemoryState, int minRunTime, int maxRunTime)

Method summary

Modifier and TypeMethod
public MultiTickTask$Status
getStatus()
method_18921()
getStatus()
public Set<MemoryModuleType<?>>
getRequiredMemories()
method_1_1080()
requiredMemoryModules()
public final boolean
tryStart(ServerLevel level, E body, long timestamp)
method_18922(class_3218 arg0, E arg1, long arg2)
tryStarting(ServerWorld arg0, E arg1, long arg2)
protected void
start(ServerLevel level, E body, long timestamp)
method_18920(class_3218 arg0, E arg1, long arg2)
run(ServerWorld world, E entity, long time)
public final void
tickOrStop(ServerLevel level, E body, long timestamp)
method_18923(class_3218 arg0, E arg1, long arg2)
tick(ServerWorld arg0, E arg1, long arg2)
protected void
tick(ServerLevel level, E body, long timestamp)
method_18924(class_3218 arg0, E arg1, long arg2)
keepRunning(ServerWorld world, E entity, long time)
public final void
doStop(ServerLevel level, E body, long timestamp)
method_18925(class_3218 arg0, E arg1, long arg2)
stop(ServerWorld arg0, E arg1, long arg2)
protected void
stop(ServerLevel level, E body, long timestamp)
method_18926(class_3218 arg0, E arg1, long arg2)
finishRunning(ServerWorld world, E entity, long time)
protected boolean
canStillUse(ServerLevel level, E body, long timestamp)
method_18927(class_3218 arg0, E arg1, long arg2)
shouldKeepRunning(ServerWorld world, E entity, long time)
protected boolean
timedOut(long timestamp)
method_18915(long arg0)
isTimeLimitExceeded(long time)
protected boolean
checkExtraStartConditions(ServerLevel level, E body)
method_18919(class_3218 arg0, E arg1)
shouldRun(ServerWorld world, E entity)
public String
debugString()
method_46910()
getName()
protected boolean
hasRequiredMemories(E body)
method_19546(E arg0)
hasRequiredMemoryState(E entity)