as a side effect, this also fixes the bug where you couldn't
stack beds to form "bunk" beds.
Place a bed, right-click it with dye to color it.
Place two beds side by side and they'll form a king-size bed, which
you can right right-click with dye to color.
Place a regular bed, then right-click it while wielding another
regular bed (i.e. as if you were trying to place it) and, if there
is room above the first bed, the second will be placed on top and
the bedposts on the bottom one will extend to reach it. Color
either of the two by right-clicking with dye.
Shift-right-click forces placement of a regular bed without trying
to stack it into bunks.
Right-click while NOT wielding a bed or dye will attempt to let you
sleep (via default beds code).