Interface EntitySleepEvents.SetBedOccupationState

Enclosing class:
EntitySleepEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface EntitySleepEvents.SetBedOccupationState
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    setBedOccupationState(LivingEntity entity, BlockPos sleepingPos, BlockState bedState, boolean occupied)
    Sets the occupation state of a bed block.
  • Method Details

    • setBedOccupationState

      boolean setBedOccupationState(LivingEntity entity, BlockPos sleepingPos, BlockState bedState, boolean occupied)
      Sets the occupation state of a bed block.
      Parameters:
      entity - the sleeping entity
      sleepingPos - the sleeping position
      bedState - the block state of the bed
      occupied - true if occupied, false if free
      Returns:
      true if the occupation state was successfully modified, false to fall back to other callbacks