How can I avoid mobs spawning inside my house while I sleep?

The latest Minecraft update now has beds, which is very nice for the first few nights of the game while you establish a mob-resistant area that you can work in during the night.

For reference, you sleep in a bed during the nighttime and it fast-forwards to daylight.

My problem is that I've put down a bed, and every time I sleep in it I get woken up by mobs inside my house. I've made sure it's very light, darkened it a bit - tried a few combinations but no luck.

What am I missing? How can I avoid having mobs spawning inside my house every time I try and get some sleep?


According to the Minecraft Wiki, aggressive mobs won't wake you if you surround your bed with torches. Here is what it says about the mob behavior:

To ensure that you are not awakened unnecessarily during the night, the bed must not be placed along a 1 block thick wall, unless the area on the other side of the wall is also safe. If a hostile mob can get within 2 blocks of the bed, even if the blocks are separated by a wall, you will be awakened with the hostile mob standing next to you. There appears to be a slight delay before the mob attacks you, giving you time to get the first blow.


Edit: As of Minecraft 1.0, mobs will not awaken you suddenly if your bed is placed in an unideal location. Instead, the game won't let you sleep and will state that there are mobs nearby.


I had similar problems, and my bed was nowhere near a wall. The room was well lit, and I couldn't figure out the problem was. I finally found it in the wiki:

If you use your bed, and have a door with a right hinge (as viewed from the outside), monsters can still get to you and wake you up, as though no door was present. One example of this is a room with double doors, atleast one of the doors will be unsafe.

D'oh!


Jeb recently tweeted the following:

New bed behavior... Instead of being woken up by monsters, you are not allowed to sleep if monsters are nearby. Once you sleep you're safe

This means that as of Minecraft's official release next week, you will never have to worry about being woken by monsters again. \o/