Class RunSometimesTask<E extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.RunSometimesTask<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RangedInteger
private boolean
private int
private boolean
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
Constructor Summary
ConstructorDescriptionRunSometimesTask
(Task<? super E> p_i231531_1_, boolean p_i231531_2_, RangedInteger p_i231531_3_) RunSometimesTask
(Task<? super E> p_i231530_1_, RangedInteger p_i231530_2_) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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_) private void
resetTicksUntilNextStart
(ServerWorld p_233949_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_) protected boolean
timedOut
(long p_220383_1_) toString()
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
doStop, getStatus, tickOrStop, tryStart
-
Field Details
-
resetTicks
private boolean resetTicks -
wasRunning
private boolean wasRunning -
interval
-
wrappedBehavior
-
ticksUntilNextStart
private int ticksUntilNextStart
-
-
Constructor Details
-
RunSometimesTask
-
RunSometimesTask
public RunSometimesTask(Task<? super E> p_i231531_1_, boolean p_i231531_2_, RangedInteger p_i231531_3_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classTask<E extends LivingEntity>
-
start
- Overrides:
start
in classTask<E extends LivingEntity>
-
canStillUse
- Overrides:
canStillUse
in classTask<E extends LivingEntity>
-
tick
- Overrides:
tick
in classTask<E extends LivingEntity>
-
stop
- Overrides:
stop
in classTask<E extends LivingEntity>
-
resetTicksUntilNextStart
-
timedOut
protected boolean timedOut(long p_220383_1_) - Overrides:
timedOut
in classTask<E extends LivingEntity>
-
toString
- Overrides:
toString
in classTask<E extends LivingEntity>
-