Class RunSometimesTask<E extends LivingEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<E>
-
- net.minecraft.entity.ai.brain.task.RunSometimesTask<E>
-
public class RunSometimesTask<E extends LivingEntity> extends Task<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
-
Field Summary
Fields Modifier and Type Field Description private RangedInteger
interval
private boolean
resetTicks
private int
ticksUntilNextStart
private boolean
wasRunning
private Task<? super E>
wrappedBehavior
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description RunSometimesTask(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
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_)
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_)
java.lang.String
toString()
-
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
doStop, getStatus, tickOrStop, tryStart
-
-
-
-
Field Detail
-
resetTicks
private boolean resetTicks
-
wasRunning
private boolean wasRunning
-
interval
private final RangedInteger interval
-
wrappedBehavior
private final Task<? super E extends LivingEntity> wrappedBehavior
-
ticksUntilNextStart
private int ticksUntilNextStart
-
-
Constructor Detail
-
RunSometimesTask
public RunSometimesTask(Task<? super E> p_i231530_1_, RangedInteger p_i231530_2_)
-
RunSometimesTask
public RunSometimesTask(Task<? super E> p_i231531_1_, boolean p_i231531_2_, RangedInteger p_i231531_3_)
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<E extends LivingEntity>
-
start
protected void start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
- Overrides:
start
in classTask<E extends LivingEntity>
-
canStillUse
protected boolean canStillUse(ServerWorld p_212834_1_, E p_212834_2_, long p_212834_3_)
- Overrides:
canStillUse
in classTask<E extends LivingEntity>
-
tick
protected void tick(ServerWorld p_212833_1_, E p_212833_2_, long p_212833_3_)
- Overrides:
tick
in classTask<E extends LivingEntity>
-
stop
protected void stop(ServerWorld p_212835_1_, E p_212835_2_, long p_212835_3_)
- Overrides:
stop
in classTask<E extends LivingEntity>
-
resetTicksUntilNextStart
private void resetTicksUntilNextStart(ServerWorld p_233949_1_)
-
timedOut
protected boolean timedOut(long p_220383_1_)
- Overrides:
timedOut
in classTask<E extends LivingEntity>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classTask<E extends LivingEntity>
-
-