类 SleepingLocationCheckEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.player.SleepingLocationCheckEvent

public class SleepingLocationCheckEvent extends LivingEvent
This event is fired when game checks, if sleeping player should be still considered "in bed".
Failing this check will cause player to wake up.
This event has a result. Event.HasResult
setResult(ALLOW) informs game that player is still "in bed"
setResult(DEFAULT) causes game to check IForgeBlock.isBed(BlockState, BlockGetter, BlockPos, Entity) instead
  • 字段详细资料

    • sleepingLocation

      private final BlockPos sleepingLocation
  • 构造器详细资料

    • SleepingLocationCheckEvent

      public SleepingLocationCheckEvent(LivingEntity player, BlockPos sleepingLocation)
  • 方法详细资料

    • getSleepingLocation

      public BlockPos getSleepingLocation()