Class LongJumpToRandomPos<E extends Mob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos<E>
- All Implemented Interfaces:
- BehaviorControl<E>
- Direct Known Subclasses:
- LongJumpToPreferredBlock
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.BehaviorBehavior.Status
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final BiPredicate<E,BlockPos> protected Vec3protected static final intprotected intprivate final Function<E,SoundEvent> protected List<LongJumpToRandomPos.PossibleJump>protected final floatprotected final intprotected final intprotected static final intprivate static final intprotected longprivate static final intprivate final UniformIntFields inherited from class net.minecraft.world.entity.ai.behavior.BehaviorDEFAULT_DURATION, entryCondition
- 
Constructor SummaryConstructorsConstructorDescriptionLongJumpToRandomPos(UniformInt p_147637_, int p_147638_, int p_147639_, float p_147640_, Function<E, SoundEvent> p_147641_) LongJumpToRandomPos(UniformInt p_251244_, int p_248763_, int p_251698_, float p_250165_, Function<E, SoundEvent> p_249738_, BiPredicate<E, BlockPos> p_249945_) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected Vec3calculateOptimalJumpVector(Mob p_217304_, Vec3 p_217305_) protected booleancanStillUse(ServerLevel p_147653_, Mob p_147654_, long p_147655_) protected booleancheckExtraStartConditions(ServerLevel p_147650_, Mob p_147651_) static <E extends Mob>
 booleandefaultAcceptableLandingSpot(E p_251540_, BlockPos p_248879_) protected Optional<LongJumpToRandomPos.PossibleJump>getJumpCandidate(ServerLevel p_217299_) private booleanisAcceptableLandingPosition(ServerLevel p_217300_, E p_217301_, BlockPos p_217302_) protected voidpickCandidate(ServerLevel p_217319_, E p_217320_, long p_217321_) protected voidstart(ServerLevel p_147676_, E p_147677_, long p_147678_) protected voidtick(ServerLevel p_147680_, E p_147681_, long p_147682_) Methods inherited from class net.minecraft.world.entity.ai.behavior.BehaviordebugString, doStop, getStatus, hasRequiredMemories, stop, tickOrStop, timedOut, tryStart
- 
Field Details- 
FIND_JUMP_TRIESprotected static final int FIND_JUMP_TRIES- See Also:
 
- 
PREPARE_JUMP_DURATIONprivate static final int PREPARE_JUMP_DURATION- See Also:
 
- 
MIN_PATHFIND_DISTANCE_TO_VALID_JUMPprotected static final int MIN_PATHFIND_DISTANCE_TO_VALID_JUMP- See Also:
 
- 
TIME_OUT_DURATIONprivate static final int TIME_OUT_DURATION- See Also:
 
- 
ALLOWED_ANGLES
- 
timeBetweenLongJumps
- 
maxLongJumpHeightprotected final int maxLongJumpHeight
- 
maxLongJumpWidthprotected final int maxLongJumpWidth
- 
maxJumpVelocityprotected final float maxJumpVelocity
- 
jumpCandidates
- 
initialPosition
- 
chosenJump
- 
findJumpTriesprotected int findJumpTries
- 
prepareJumpStartprotected long prepareJumpStart
- 
getJumpSound
- 
acceptableLandingSpot
 
- 
- 
Constructor Details- 
LongJumpToRandomPospublic LongJumpToRandomPos(UniformInt p_147637_, int p_147638_, int p_147639_, float p_147640_, Function<E, SoundEvent> p_147641_) 
- 
LongJumpToRandomPospublic LongJumpToRandomPos(UniformInt p_251244_, int p_248763_, int p_251698_, float p_250165_, Function<E, SoundEvent> p_249738_, BiPredicate<E, BlockPos> p_249945_) 
 
- 
- 
Method Details- 
defaultAcceptableLandingSpot
- 
checkExtraStartConditions- Overrides:
- checkExtraStartConditionsin class- Behavior<E extends Mob>
 
- 
canStillUse- Overrides:
- canStillUsein class- Behavior<E extends Mob>
 
- 
start
- 
tick
- 
pickCandidate
- 
getJumpCandidate
- 
isAcceptableLandingPosition
- 
calculateOptimalJumpVector
 
-