Class RunSometimes<E extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.RunSometimes<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final UniformInt
private boolean
private int
private boolean
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionRunSometimes
(Behavior<? super E> p_147877_, boolean p_147878_, UniformInt p_147879_) RunSometimes
(Behavior<? super E> p_147874_, UniformInt p_147875_) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel p_23860_, E p_23861_, long p_23862_) protected boolean
checkExtraStartConditions
(ServerLevel p_23853_, E p_23854_) private void
resetTicksUntilNextStart
(ServerLevel p_23851_) protected void
start
(ServerLevel p_23856_, E p_23857_, long p_23858_) protected void
stop
(ServerLevel p_23864_, E p_23865_, long p_23866_) protected void
tick
(ServerLevel p_23868_, E p_23869_, long p_23870_) protected boolean
timedOut
(long p_23849_) toString()
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
doStop, getStatus, tickOrStop, tryStart
-
Field Details
-
resetTicks
private boolean resetTicks -
wasRunning
private boolean wasRunning -
interval
-
wrappedBehavior
-
ticksUntilNextStart
private int ticksUntilNextStart
-
-
Constructor Details
-
RunSometimes
-
RunSometimes
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends LivingEntity>
-
start
- Overrides:
start
in classBehavior<E extends LivingEntity>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends LivingEntity>
-
tick
- Overrides:
tick
in classBehavior<E extends LivingEntity>
-
stop
- Overrides:
stop
in classBehavior<E extends LivingEntity>
-
resetTicksUntilNextStart
-
timedOut
protected boolean timedOut(long p_23849_) - Overrides:
timedOut
in classBehavior<E extends LivingEntity>
-
toString
- Overrides:
toString
in classBehavior<E extends LivingEntity>
-