Interface EntitySleepEvents.ModifySleepingDirection

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.ModifySleepingDirection
  • Method Details

    • modifySleepDirection

      @Nullable @Nullable Direction modifySleepDirection(LivingEntity entity, BlockPos sleepingPos, @Nullable @Nullable Direction sleepingDirection)
      Modifies or provides a sleeping direction for a block. The sleeping direction is where a player's head is pointing when they're sleeping.
      Parameters:
      entity - the sleeping entity
      sleepingPos - the position of the block slept on
      sleepingDirection - the old sleeping direction, or null if not determined by vanilla or previous callbacks
      Returns:
      the new sleeping direction