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.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.
-
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
-true
if vanilla allows the block,false
otherwise- Returns:
ActionResult.SUCCESS
if the bed is valid,ActionResult.FAIL
if it's not,ActionResult.PASS
to fall back to other callbacks
-