Class RunIf<E extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.RunIf<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
entryCondition
-
Constructor Summary
ConstructorDescriptionRunIf(Map<MemoryModuleType<?>,MemoryStatus> p_23799_, Predicate<E> p_23800_, Behavior<? super E> p_23801_, boolean p_23802_)
RunIf(Map<MemoryModuleType<?>,MemoryStatus> p_147865_, Behavior<? super E> p_147866_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse(ServerLevel p_23819_, E p_23820_, long p_23821_)
protected boolean
checkExtraStartConditions(ServerLevel p_23809_, E p_23810_)
private static Map<MemoryModuleType<?>,MemoryStatus>
mergeMaps(Map<MemoryModuleType<?>,MemoryStatus> p_23816_, Map<MemoryModuleType<?>,MemoryStatus> p_23817_)
protected void
start(ServerLevel p_23812_, E p_23813_, long p_23814_)
protected void
stop(ServerLevel p_23823_, E p_23824_, long p_23825_)
protected void
tick(ServerLevel p_23827_, E p_23828_, long p_23829_)
protected boolean
timedOut(long p_23807_)
toString()
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
doStop, getStatus, tickOrStop, tryStart
-
Field Details
-
predicate
-
wrappedBehavior
-
checkWhileRunningAlso
private final boolean checkWhileRunningAlso
-
-
Constructor Details
-
RunIf
public RunIf(Map<MemoryModuleType<?>,MemoryStatus> p_23799_, Predicate<E> p_23800_, Behavior<? super E> p_23801_, boolean p_23802_) -
RunIf
-
RunIf
-
RunIf
-
-
Method Details
-
mergeMaps
private static Map<MemoryModuleType<?>,MemoryStatus> mergeMaps(Map<MemoryModuleType<?>,MemoryStatus> p_23816_, Map<MemoryModuleType<?>,MemoryStatus> p_23817_) -
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends LivingEntity>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends LivingEntity>
-
timedOut
protected boolean timedOut(long p_23807_)- Overrides:
timedOut
in classBehavior<E extends LivingEntity>
-
start
- Overrides:
start
in classBehavior<E extends LivingEntity>
-
tick
- Overrides:
tick
in classBehavior<E extends LivingEntity>
-
stop
- Overrides:
stop
in classBehavior<E extends LivingEntity>
-
toString
- Overrides:
toString
in classBehavior<E extends LivingEntity>
-