- 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.
-
Method Summary
@Nullable net.minecraft.util.math.Direction
modifySleepDirection(net.minecraft.entity.LivingEntity entity,
net.minecraft.util.math.BlockPos sleepingPos,
@Nullable net.minecraft.util.math.Direction sleepingDirection)
Modifies or provides a sleeping direction for a block.
-
Method Details
-
modifySleepDirection
@Nullable
@Nullable net.minecraft.util.math.Direction modifySleepDirection(net.minecraft.entity.LivingEntity entity,
net.minecraft.util.math.BlockPos sleepingPos,
@Nullable
@Nullable net.minecraft.util.math.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