Add bed placement

This makes bed placement possible. Beds get placed with the foot block on the clicked block, and the head block one block away from the foot block in the opposite direction from the player, just like in vanilla Minecraft. Placement with the head block in the air or inside another block is not possible.
all of these variables shouldn't be declared and then set. Instead they should be set when declared.