Class LongJumpToRandomPos<E extends Mob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos<E>
- Direct Known Subclasses:
LongJumpToPreferredBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate<BlockState>
protected Vec3
protected static final int
protected int
private Function<E,
SoundEvent> protected List<LongJumpToRandomPos.PossibleJump>
protected final float
protected final int
protected final int
protected static final int
private static final int
protected long
private static final int
private final UniformInt
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionLongJumpToRandomPos
(UniformInt p_147637_, int p_147638_, int p_147639_, float p_147640_, Function<E, SoundEvent> p_147641_) LongJumpToRandomPos
(UniformInt p_217293_, int p_217294_, int p_217295_, float p_217296_, Function<E, SoundEvent> p_217297_, Predicate<BlockState> p_217298_) -
Method Summary
Modifier and TypeMethodDescriptionprivate Vec3
calculateJumpVectorForAngle
(Mob p_217307_, Vec3 p_217308_, int p_217309_) protected Vec3
calculateOptimalJumpVector
(Mob p_217304_, Vec3 p_217305_) protected boolean
canStillUse
(ServerLevel p_147653_, Mob p_147654_, long p_147655_) protected boolean
checkExtraStartConditions
(ServerLevel p_147650_, Mob p_147651_) protected Optional<LongJumpToRandomPos.PossibleJump>
getJumpCandidate
(ServerLevel p_217299_) protected boolean
isAcceptableLandingPosition
(ServerLevel p_217300_, E p_217301_, BlockPos p_217302_) private boolean
isClearTransition
(Mob p_147664_, Vec3 p_147665_, Vec3 p_147666_) protected void
pickCandidate
(ServerLevel p_217319_, E p_217320_, long p_217321_) protected void
start
(ServerLevel p_147676_, E p_147677_, long p_147678_) protected void
tick
(ServerLevel p_147680_, E p_147681_, long p_147682_)
-
Field Details
-
FIND_JUMP_TRIES
protected static final int FIND_JUMP_TRIES- See Also:
-
PREPARE_JUMP_DURATION
private static final int PREPARE_JUMP_DURATION- See Also:
-
MIN_PATHFIND_DISTANCE_TO_VALID_JUMP
protected static final int MIN_PATHFIND_DISTANCE_TO_VALID_JUMP- See Also:
-
TIME_OUT_DURATION
private static final int TIME_OUT_DURATION- See Also:
-
ALLOWED_ANGLES
-
timeBetweenLongJumps
-
maxLongJumpHeight
protected final int maxLongJumpHeight -
maxLongJumpWidth
protected final int maxLongJumpWidth -
maxJumpVelocity
protected final float maxJumpVelocity -
jumpCandidates
-
initialPosition
-
chosenJump
-
findJumpTries
protected int findJumpTries -
prepareJumpStart
protected long prepareJumpStart -
getJumpSound
-
acceptableLandingSpot
-
-
Constructor Details
-
LongJumpToRandomPos
public LongJumpToRandomPos(UniformInt p_147637_, int p_147638_, int p_147639_, float p_147640_, Function<E, SoundEvent> p_147641_) -
LongJumpToRandomPos
public LongJumpToRandomPos(UniformInt p_217293_, int p_217294_, int p_217295_, float p_217296_, Function<E, SoundEvent> p_217297_, Predicate<BlockState> p_217298_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends Mob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends Mob>
-
start
-
tick
-
pickCandidate
-
getJumpCandidate
-
isAcceptableLandingPosition
protected boolean isAcceptableLandingPosition(ServerLevel p_217300_, E p_217301_, BlockPos p_217302_) -
calculateOptimalJumpVector
-
calculateJumpVectorForAngle
-
isClearTransition
-