Class JumpOnBed
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Mob>
net.minecraft.world.entity.ai.behavior.JumpOnBed
- All Implemented Interfaces:
BehaviorControl<Mob>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate intprivate intprivate intprivate final floatprivate BlockPosFields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel pLevel, Mob pEntity, long pGameTime) protected booleancheckExtraStartConditions(ServerLevel pLevel, Mob pOwner) getNearestBed(Mob pMob) private booleanisBed(ServerLevel pLevel, BlockPos pPos) private booleannearBed(ServerLevel pLevel, Mob pMob) private booleanonBedSurface(ServerLevel pLevel, Mob pMob) private booleanonOrOverBed(ServerLevel pLevel, Mob pMob) protected voidstart(ServerLevel pLevel, Mob pEntity, long pGameTime) private voidstartWalkingTowardsBed(Mob pMob, BlockPos pPos) protected voidstop(ServerLevel pLevel, Mob pEntity, long pGameTime) protected voidtick(ServerLevel pLevel, Mob pOwner, long pGameTime) protected booleantimedOut(long pGameTime) private booleantiredOfJumping(ServerLevel pLevel, Mob pMob) private booleantiredOfWalking(ServerLevel pLevel, Mob pMob) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, tryStart
-
Field Details
-
MAX_TIME_TO_REACH_BED
private static final int MAX_TIME_TO_REACH_BED- See Also:
-
MIN_JUMPS
private static final int MIN_JUMPS- See Also:
-
MAX_JUMPS
private static final int MAX_JUMPS- See Also:
-
COOLDOWN_BETWEEN_JUMPS
private static final int COOLDOWN_BETWEEN_JUMPS- See Also:
-
speedModifier
private final float speedModifier -
targetBed
-
remainingTimeToReachBed
private int remainingTimeToReachBed -
remainingJumps
private int remainingJumps -
remainingCooldownUntilNextJump
private int remainingCooldownUntilNextJump
-
-
Constructor Details
-
JumpOnBed
public JumpOnBed(float pSpeedModifier)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<Mob>
-
start
-
stop
-
canStillUse
- Overrides:
canStillUsein classBehavior<Mob>
-
timedOut
protected boolean timedOut(long pGameTime) -
tick
-
startWalkingTowardsBed
-
nearBed
-
onOrOverBed
-
onBedSurface
-
isBed
-
getNearestBed
-
tiredOfWalking
-
tiredOfJumping
-