mojira.dev
MC-92719

You can sleep in beds near various hostile mobs

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

  1. Try to sleep in a bed next to one of the mobs mentioned above

  2. 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

Attachments

Comments 23

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)

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.

Confirmed for 16w07b

This still happens in 1.9.

Confirmed for 1.10-pre1

13 more comments

Can confirm in 1.19.1.

Can confirm in 1.19.2.

Non-Hostile Endermen and Hoglins can also be added to this list

I think endermen are considered neutral mobs, regardless of whether they're angered or not. Added hoglins to the list.

.

[Mod] turbo

(Unassigned)

Confirmed

Gameplay

Low

Player

bed, hostile-mobs, player, sleep

Minecraft 15w46a, Minecraft 15w49b, Minecraft 16w07b, Minecraft 1.9, Minecraft 1.9.4, ..., 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.5

Retrieved