Class LongJumpToPreferredBlock<E extends Mob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos<E>
net.minecraft.world.entity.ai.behavior.LongJumpToPreferredBlock<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos
LongJumpToRandomPos.PossibleJump
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final List<LongJumpToRandomPos.PossibleJump>
private final float
Fields inherited from class net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos
chosenJump, FIND_JUMP_TRIES, findJumpTries, initialPosition, jumpCandidates, maxJumpVelocity, maxLongJumpHeight, maxLongJumpWidth, MIN_PATHFIND_DISTANCE_TO_VALID_JUMP, prepareJumpStart
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionLongJumpToPreferredBlock
(UniformInt p_217264_, int p_217265_, int p_217266_, float p_217267_, Function<E, SoundEvent> p_217268_, TagKey<Block> p_217269_, float p_217270_, Predicate<BlockState> p_217271_) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<LongJumpToRandomPos.PossibleJump>
getJumpCandidate
(ServerLevel p_217273_) protected boolean
isAcceptableLandingPosition
(ServerLevel p_217283_, E p_217284_, BlockPos p_217285_) protected void
start
(ServerLevel p_217279_, E p_217280_, long p_217281_) private boolean
willNotLandInFluid
(ServerLevel p_217287_, BlockPos p_217288_) Methods inherited from class net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos
calculateOptimalJumpVector, canStillUse, checkExtraStartConditions, pickCandidate, tick
-
Field Details
-
preferredBlockTag
-
preferredBlocksChance
private final float preferredBlocksChance -
notPrefferedJumpCandidates
-
currentlyWantingPreferredOnes
private boolean currentlyWantingPreferredOnes
-
-
Constructor Details
-
LongJumpToPreferredBlock
public LongJumpToPreferredBlock(UniformInt p_217264_, int p_217265_, int p_217266_, float p_217267_, Function<E, SoundEvent> p_217268_, TagKey<Block> p_217269_, float p_217270_, Predicate<BlockState> p_217271_)
-
-
Method Details
-
start
- Overrides:
start
in classLongJumpToRandomPos<E extends Mob>
-
getJumpCandidate
- Overrides:
getJumpCandidate
in classLongJumpToRandomPos<E extends Mob>
-
isAcceptableLandingPosition
protected boolean isAcceptableLandingPosition(ServerLevel p_217283_, E p_217284_, BlockPos p_217285_) - Overrides:
isAcceptableLandingPosition
in classLongJumpToRandomPos<E extends Mob>
-
willNotLandInFluid
-