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(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos sleepingPos, net.minecraft.block.BlockState bedState, boolean occupied)
    Sets the occupation state of a bed block.
  • Method Details

    • setBedOccupationState

      boolean setBedOccupationState(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos sleepingPos, net.minecraft.block.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