Interface ICitizenSleepHandler
- All Known Implementing Classes:
CitizenSleepHandler
public interface ICitizenSleepHandler
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.BlockPosGet the bed location of the citizen.booleanisAsleep()Is the citizen a sleep?voidonWakeUp()Called when the citizen wakes up.booleanWhether we should start to go sleepingbooleantrySleep(net.minecraft.core.BlockPos bedLocation) Attempts a sleep interaction with the citizen and the given bed.
-
Method Details
-
isAsleep
boolean isAsleep()Is the citizen a sleep?- Returns:
- true when a sleep.
-
trySleep
boolean trySleep(net.minecraft.core.BlockPos bedLocation) Attempts a sleep interaction with the citizen and the given bed.- Parameters:
bedLocation- The possible location to sleep.- Returns:
- if successful.
-
onWakeUp
void onWakeUp()Called when the citizen wakes up. -
getBedLocation
net.minecraft.core.BlockPos getBedLocation()Get the bed location of the citizen.- Returns:
- the bed location.
-
shouldGoSleep
boolean shouldGoSleep()Whether we should start to go sleeping- Returns:
- true if should sleep
-