Class JumpOnBed
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<Mob>
net.minecraft.world.entity.ai.behavior.JumpOnBed
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel p_23383_, Mob p_23384_, long p_23385_) protected boolean
checkExtraStartConditions
(ServerLevel p_23346_, Mob p_23347_) getNearestBed
(Mob p_23360_) private boolean
isBed
(ServerLevel p_23357_, BlockPos p_23358_) private boolean
nearBed
(ServerLevel p_23369_, Mob p_23370_) private boolean
onBedSurface
(ServerLevel p_23391_, Mob p_23392_) private boolean
onOrOverBed
(ServerLevel p_23380_, Mob p_23381_) protected void
start
(ServerLevel p_23349_, Mob p_23350_, long p_23351_) private void
startWalkingTowardsBed
(Mob p_23362_, BlockPos p_23363_) protected void
stop
(ServerLevel p_23372_, Mob p_23373_, long p_23374_) protected void
tick
(ServerLevel p_23394_, Mob p_23395_, long p_23396_) protected boolean
timedOut
(long p_23337_) private boolean
tiredOfJumping
(ServerLevel p_23401_, Mob p_23402_) private boolean
tiredOfWalking
(ServerLevel p_23398_, Mob p_23399_)
-
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 p_23335_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<Mob>
-
start
-
stop
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Mob>
-
timedOut
protected boolean timedOut(long p_23337_) -
tick
-
startWalkingTowardsBed
-
nearBed
-
onOrOverBed
-
onBedSurface
-
isBed
-
getNearestBed
-
tiredOfWalking
-
tiredOfJumping
-