mojira.dev
MC-5330

Range for using bed is lower than normal range

Although you can right-click a bed from a short distance from it, (and during the day as long as you can see the hitbox it will say "You can only sleep at night"), in order to actually sleep in the bed you must click it when you are right next to it.

Linked issues

Attachments

Comments 20

The first screenshot shows that when I right-click the bed from where I stand it says that I have indeed tried to sleep in the day.

The second shows me from the same spot and setting the time to night, but I cannot sleep in the bed unless I get really close to it.

This is linked to creative mode. The maximum reach on creative mode is much higher, but the code for sleeping checks that you are within survival mode's max range. It's a small discrepancy. Might be best putting the time check within the other range checks to resolve the discrepancy, but it's otherwise not going to cause any problems.

The same result is seen in both game modes.
I only did it in creative because it was daytime in my survival world

Edit 10:17 22.1.2013

Confirmed on 1.4.7 survival, creative

Confirmed on 1.4.6 survival, creative

In day time you can right click on the bed and get the error "You can only sleep at night" from whatever is you maximal reach, however at night you can only right click on the bed (and go to sleep) from 3 block radius cantered on the bed block you click (not including the bed block itself).
#######
#######
#######
###B###
###B###
#######
#######
#######

Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

10 more comments

Well, then the animation is wrong. It should either:

  • Do nothing and don't play an animation.

  • Use the item in hand.

  • Use the bed

Added a message telling the user that he/she is too far away for sleeping (should be less confusing now). Also made sure the too far away check checks for both parts of the bed.

The message doesn't show 😞

Different ticket please.

FireHunterX

Agnes Larsson

Confirmed

Minecraft 1.4.6, Minecraft 1.4.7, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.2, ..., Minecraft 16w21a, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10, Minecraft 1.10.2

Minecraft 16w33a

Retrieved