The bug
You can sleep in a bed despite the fact that there are some hostile mobs around. The game does not display the error message "You may not rest now, there are monsters nearby".
Mobs affected
You can sleep near:
Slimes
Magma Cubes
Ghasts
Shulkers (probably intended as they don't despawn with peaceful as difficulty)
Aggressive wolves
Killer rabbits
Ender dragons (see Shulker; however you cannot sleep near Withers)
Hoglins
How to reproduce
Try to sleep in a bed next to one of the mobs mentioned above
You'll be able to sleep in that bed without the console issuing a
"You may not rest now, there are monsters nearby"warning
Linked issues
is duplicated by 1
Attachments
Comments 23
Regarding to Magma Cubes, Ghasts and the Ender Dragon - this might be intended due to the bed exploding feature?
If Magma Cubes are basically the same code as Slimes, I don't know if that makes things anymore difficult to deal with regarding to what might be an intended feature.
I think endermen are considered neutral mobs, regardless of whether they're angered or not. Added hoglins to the list.
Confirmed for
15w49b For the listed mobs
Other affected monsters:
Shulker (probably intended as they don't despawn with peaceful as difficulty)
Aggressive wolves
EnderDragon (see Shulker; however you cannot sleep near WitherBosses)