Description

Although you can right-click a bed from a short distance from it, (and during the day as long as you can see the hitbox it will say "You can only sleep at night"), in order to actually sleep in the bed you must click it when you are right next to it.