Class SleepInBed
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<LivingEntity>
net.minecraft.world.entity.ai.behavior.SleepInBed
- All Implemented Interfaces:
BehaviorControl<LivingEntity>
-
Nested Class Summary
Nested classes/interfaces inherited from class Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate longFields inherited from class Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, LivingEntity body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, LivingEntity body) protected voidstart(ServerLevel level, LivingEntity body, long timestamp) protected voidstop(ServerLevel level, LivingEntity body, long timestamp) protected booleantimedOut(long timestamp) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, getStatus, hasRequiredMemories, tick, tickOrStop, tryStart
-
Field Details
-
COOLDOWN_AFTER_BEING_WOKEN
public static final int COOLDOWN_AFTER_BEING_WOKEN- See Also:
-
nextOkStartTime
private long nextOkStartTime
-
-
Constructor Details
-
SleepInBed
public SleepInBed()
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<LivingEntity>
-
canStillUse
- Overrides:
canStillUsein classBehavior<LivingEntity>
-
start
- Overrides:
startin classBehavior<LivingEntity>
-
timedOut
protected boolean timedOut(long timestamp) - Overrides:
timedOutin classBehavior<LivingEntity>
-
stop
- Overrides:
stopin classBehavior<LivingEntity>
-