Class PrepareRamNearestTarget<E extends PathfinderMob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.PrepareRamNearestTarget<E>
- All Implemented Interfaces:
BehaviorControl<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 ToIntFunction<E>
private final Function<E,
SoundEvent> private final int
private final int
private final int
private final TargetingConditions
static final int
private final float
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionPrepareRamNearestTarget
(ToIntFunction<E> p_147724_, int p_147725_, int p_147726_, float p_147727_, TargetingConditions p_147728_, int p_147729_, Function<E, SoundEvent> p_147730_) -
Method Summary
Modifier and TypeMethodDescriptioncalculateRammingStartPosition
(PathfinderMob p_147743_, LivingEntity p_147744_) protected boolean
canStillUse
(ServerLevel p_147773_, PathfinderMob p_147774_, long p_147775_) private void
chooseRamPosition
(PathfinderMob p_147766_, LivingEntity p_147767_) private Vec3
getEdgeOfBlock
(BlockPos p_147755_, BlockPos p_147756_) private boolean
isWalkableBlock
(PathfinderMob p_147746_, BlockPos p_147747_) protected void
start
(ServerLevel p_147736_, PathfinderMob p_147737_, long p_147738_) protected void
stop
(ServerLevel p_147762_, E p_147763_, long p_147764_) protected void
tick
(ServerLevel p_147784_, E p_147785_, long p_147786_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
checkExtraStartConditions, debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
TIME_OUT_DURATION
public static final int TIME_OUT_DURATION- See Also:
-
getCooldownOnFail
-
minRamDistance
private final int minRamDistance -
maxRamDistance
private final int maxRamDistance -
walkSpeed
private final float walkSpeed -
ramTargeting
-
ramPrepareTime
private final int ramPrepareTime -
getPrepareRamSound
-
reachedRamPositionTimestamp
-
ramCandidate
-
-
Constructor Details
-
PrepareRamNearestTarget
public PrepareRamNearestTarget(ToIntFunction<E> p_147724_, int p_147725_, int p_147726_, float p_147727_, TargetingConditions p_147728_, int p_147729_, Function<E, SoundEvent> p_147730_)
-
-
Method Details
-
start
- Overrides:
start
in classBehavior<E extends PathfinderMob>
-
stop
- Overrides:
stop
in classBehavior<E extends PathfinderMob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends PathfinderMob>
-
tick
- Overrides:
tick
in classBehavior<E extends PathfinderMob>
-
getEdgeOfBlock
-
calculateRammingStartPosition
private Optional<BlockPos> calculateRammingStartPosition(PathfinderMob p_147743_, LivingEntity p_147744_) -
isWalkableBlock
-
chooseRamPosition
-