Interface ICitizenSleepHandler

All Known Implementing Classes:
CitizenSleepHandler

public interface ICitizenSleepHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.BlockPos
    Get the bed location of the citizen.
    boolean
    Is the citizen a sleep?
    void
    Called when the citizen wakes up.
    boolean
    Whether we should start to go sleeping
    boolean
    trySleep(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