Skip to content

Commit 63e60bc

Browse files
committed
Allow Bedrock players to sleep on Fabric
Fixes #5001
1 parent 1b17c6b commit 63e60bc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockMovePlayerTranslator.java

+8
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ public void translate(GeyserSession session, MovePlayerPacket packet) {
5858
session.confirmTeleport(packet.getPosition().toDouble().sub(0, EntityDefinitions.PLAYER.offset(), 0));
5959
return;
6060
}
61+
62+
if (entity.getBedPosition() != null) {
63+
// https://github.com/GeyserMC/Geyser/issues/5001
64+
// Bedrock 1.20.22 started sending a MovePlayerPacket as soon as it got into a bed.
65+
// This trips up Fabric.
66+
return;
67+
}
68+
6169
float yaw = packet.getRotation().getY();
6270
float pitch = packet.getRotation().getX();
6371
float headYaw = packet.getRotation().getY();

0 commit comments

Comments
 (0)