- 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.world.phys.Vec3
modifyWakeUpPosition(net.minecraft.world.entity.LivingEntity entity,
net.minecraft.core.BlockPos sleepingPos,
net.minecraft.world.level.block.state.BlockState bedState,
@Nullable net.minecraft.world.phys.Vec3 wakeUpPos)
Modifies or provides a wake-up position for an entity waking up.
-
Method Details
-
modifyWakeUpPosition
@Nullable net.minecraft.world.phys.Vec3 modifyWakeUpPosition(net.minecraft.world.entity.LivingEntity entity,
net.minecraft.core.BlockPos sleepingPos,
net.minecraft.world.level.block.state.BlockState bedState,
@Nullable net.minecraft.world.phys.Vec3 wakeUpPos)
Modifies or provides a wake-up position for an entity waking up.
- Parameters:
entity - the sleeping entity
sleepingPos - the position of the block slept on
bedState - the block slept on
wakeUpPos - the old wake-up position, or null if not determined by vanilla or previous callbacks
- Returns:
- the new wake-up position