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>
- All Implemented Interfaces:
BehaviorControl<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
FieldsModifier 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, maxJumpVelocityMultiplier, 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
ConstructorsConstructorDescriptionLongJumpToPreferredBlock
(UniformInt pTimeBetweenLongJumps, int pMaxLongJumpHeight, int pMaxLongJumpWidth, float pMaxJumpVelocity, Function<E, SoundEvent> pGetJumpSound, TagKey<Block> pPreferredBlockTag, float pPreferredBlocksChance, BiPredicate<E, BlockPos> pAcceptableLandingSpot) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional
<LongJumpToRandomPos.PossibleJump> getJumpCandidate
(ServerLevel pLevel) protected void
start
(ServerLevel pLevel, E pEntity, long pGameTime) Methods inherited from class net.minecraft.world.entity.ai.behavior.LongJumpToRandomPos
calculateOptimalJumpVector, canStillUse, checkExtraStartConditions, defaultAcceptableLandingSpot, pickCandidate, tick
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, stop, tickOrStop, timedOut, tryStart
-
Field Details
-
preferredBlockTag
-
preferredBlocksChance
private final float preferredBlocksChance -
notPrefferedJumpCandidates
-
currentlyWantingPreferredOnes
private boolean currentlyWantingPreferredOnes
-
-
Constructor Details
-
LongJumpToPreferredBlock
public LongJumpToPreferredBlock(UniformInt pTimeBetweenLongJumps, int pMaxLongJumpHeight, int pMaxLongJumpWidth, float pMaxJumpVelocity, Function<E, SoundEvent> pGetJumpSound, TagKey<Block> pPreferredBlockTag, float pPreferredBlocksChance, BiPredicate<E, BlockPos> pAcceptableLandingSpot)
-
-
Method Details
-
start
- Overrides:
start
in classLongJumpToRandomPos<E extends Mob>
-
getJumpCandidate
- Overrides:
getJumpCandidate
in classLongJumpToRandomPos<E extends Mob>
-