Class InteractWith<E extends LivingEntity,T extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.InteractWith<E,T>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private int
private MemoryModuleType<T>
private float
private EntityType<? extends T>
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
entryCondition
-
Constructor Summary
ConstructorDescriptionInteractWith(EntityType<? extends T> p_23246_, int p_23247_, Predicate<E> p_23248_, Predicate<T> p_23249_, MemoryModuleType<T> p_23250_, float p_23251_, int p_23252_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkExtraStartConditions(ServerLevel p_23254_, E p_23255_)
private boolean
isTargetValid(LivingEntity p_23279_)
static <T extends LivingEntity>
InteractWith<LivingEntity,T>of(EntityType<? extends T> p_147567_, int p_147568_, Predicate<T> p_147569_, MemoryModuleType<T> p_147570_, float p_147571_, int p_147572_)
static <T extends LivingEntity>
InteractWith<LivingEntity,T>of(EntityType<? extends T> p_23261_, int p_23262_, MemoryModuleType<T> p_23263_, float p_23264_, int p_23265_)
private boolean
seesAtLeastOneValidTarget(E p_23267_)
protected void
start(ServerLevel p_23257_, E p_23258_, long p_23259_)
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
maxDist
private final int maxDist -
speedModifier
private final float speedModifier -
type
-
interactionRangeSqr
private final int interactionRangeSqr -
targetFilter
-
selfFilter
-
memory
-
-
Constructor Details
-
InteractWith
public InteractWith(EntityType<? extends T> p_23246_, int p_23247_, Predicate<E> p_23248_, Predicate<T> p_23249_, MemoryModuleType<T> p_23250_, float p_23251_, int p_23252_)
-
-
Method Details
-
of
public static <T extends LivingEntity> InteractWith<LivingEntity,T> of(EntityType<? extends T> p_23261_, int p_23262_, MemoryModuleType<T> p_23263_, float p_23264_, int p_23265_) -
of
public static <T extends LivingEntity> InteractWith<LivingEntity,T> of(EntityType<? extends T> p_147567_, int p_147568_, Predicate<T> p_147569_, MemoryModuleType<T> p_147570_, float p_147571_, int p_147572_) -
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends LivingEntity>
-
seesAtLeastOneValidTarget
-
isTargetValid
-
start
- Overrides:
start
in classBehavior<E extends LivingEntity>
-