Minecraft wiki entry for Phantom-proofing, associated text: This method requires the player to constantly right-click/tap on a bed. When possible, the player can sleep in the bed. It is possible to manipulate bed mechanics so that the player ends up in front of the bed facing it to keep right-clicking/tapping on it.