The Bug
If entering a bed while the player is in a minecart (on and off rails), boat (in and out of water) or horse, the player will fall out of bed in the direction of the entity. Whether you fall out or not, is based on the position of the mount from the bed and if there are blocks to fall on to. This is not a visual bug. As placing fire on the block you fall on to, will put you fire and kick you from the bed. Video demonstrating the issue:
[media]Steps to Reproduce
Place down a boat and a bed next to one another.
Set the time to "night" and enter the boat.
Now enter the bed and take note as to whether or not players can fall out of beds if entering them from mounts.
Observed Behavior
Players can fall out of beds if entering them from mounts.
Expected Behavior
Players would not be able to fall out of beds if entering them from mounts.
Related issues
is duplicated by
relates to
Attachments
Comments


Relates to MC-149081
Also if the player is performing an action before going to bed
That action will still play afterwards
This includes but not limited to:
Hand animation if spam clicking bed while out of range
Jumping
Falling
Moving
Breaking a block
Placing a block
Closely related to MC-148370.

in 1.16RC1

In 20w29a
Can confirm in 20w51a.
Can confirm in 21w03a.
Relates to MC-112.
Can confirm in 21w06a.
Can confirm in 1.17.
Can confirm in 1.17.1.
Can confirm in 21w42a. Here are some extra details regarding this problem.
The Bug:
Players can fall out of beds if entering them from mounts.
Steps to Reproduce:
Place down a boat and a bed next to one another.
Set the time to "night" and enter the boat.
Now enter the bed and take note as to whether or not players can fall out of beds if entering them from mounts.
Observed Behavior:
Players can fall out of beds if entering them from mounts.
Expected Behavior:
Players would not be able to fall out of beds if entering them from mounts.

Can confirm in 1.18.0
Can confirm in 1.18.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 1.19.
Can confirm in 1.19.2.

Additional image from my duplicate report MC-258593

Can confirm in 1.19.4 and 23w18a
I cannot seem to reproduce this in 1.20.5 following the provided steps to reproduce, is there a step I'm missing? I tried with multiple orientations of the beds, different mounts, and moving the mounts when I get into the bed.
[media]
This issue was present in 23w07a, but no longer occurs in 1.19.4 Pre-Release 1. I've tested this multiple times and can confirm that this issue was fixed in 1.19.4 Pre=Release 1. Not sure why 1.19.4 and 23w18a are marked as affected; I tested both of these versions to find that the issue doesn't exist. I'm marking this ticket as fixed.