Interface EntitySleepEvents.AllowBed
- 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
Modifier and TypeMethodDescriptionnet.minecraft.util.ActionResultallowBed(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos sleepingPos, net.minecraft.block.BlockState state, boolean vanillaResult)Checks whether a block is a valid bed for the entity.
-
Method Details
-
allowBed
net.minecraft.util.ActionResult allowBed(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos sleepingPos, net.minecraft.block.BlockState state, boolean vanillaResult)Checks whether a block is a valid bed for the entity.Non-passing return values cancel further callbacks.
- Parameters:
entity- the sleeping entitysleepingPos- the position of the blockstate- the block state to checkvanillaResult-trueif vanilla allows the block,falseotherwise- Returns:
ActionResult.SUCCESSif the bed is valid,ActionResult.FAILif it's not,ActionResult.PASSto fall back to other callbacks
-