From 1be2a1ccac7dd78d42843ac85203757f891ea562 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Mon, 6 Mar 2023 20:53:54 -0500 Subject: [PATCH] Fix sleeping on vanilla/Fabric Fixes #3595 --- .../org/geysermc/geyser/entity/type/player/PlayerEntity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java index 74a55144e..78456646f 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/player/PlayerEntity.java @@ -239,7 +239,10 @@ public class PlayerEntity extends LivingEntity { @Override public Vector3i setBedPosition(EntityMetadata, ?> entityMetadata) { - return bedPosition = super.setBedPosition(entityMetadata); + bedPosition = super.setBedPosition(entityMetadata); + // Fixes https://github.com/GeyserMC/Geyser/issues/3595 on vanilla 1.19.3 servers - did not happen on Paper + entityMetadata.getValue().ifPresent(pos -> this.setPosition(pos.toFloat())); + return bedPosition; } public void setAbsorptionHearts(FloatEntityMetadata entityMetadata) {