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 int
private static final int
private static final int
private static final int
private int
private int
private int
private final float
private BlockPos
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, Mob pEntity, long pGameTime) protected boolean
checkExtraStartConditions
(ServerLevel pLevel, Mob pOwner) getNearestBed
(Mob pMob) private boolean
isBed
(ServerLevel pLevel, BlockPos pPos) private boolean
nearBed
(ServerLevel pLevel, Mob pMob) private boolean
onBedSurface
(ServerLevel pLevel, Mob pMob) private boolean
onOrOverBed
(ServerLevel pLevel, Mob pMob) protected void
start
(ServerLevel pLevel, Mob pEntity, long pGameTime) private void
startWalkingTowardsBed
(Mob pMob, BlockPos pPos) protected void
stop
(ServerLevel pLevel, Mob pEntity, long pGameTime) protected void
tick
(ServerLevel pLevel, Mob pOwner, long pGameTime) protected boolean
timedOut
(long pGameTime) private boolean
tiredOfJumping
(ServerLevel pLevel, Mob pMob) private boolean
tiredOfWalking
(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:
checkExtraStartConditions
in classBehavior<Mob>
-
start
-
stop
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Mob>
-
timedOut
protected boolean timedOut(long pGameTime) -
tick
-
startWalkingTowardsBed
-
nearBed
-
onOrOverBed
-
onBedSurface
-
isBed
-
getNearestBed
-
tiredOfWalking
-
tiredOfJumping
-