Fix sleeping on vanilla/Fabric

Fixes #3595
This commit is contained in:
Camotoy 2023-03-06 20:53:54 -05:00
parent 10c2e51da4
commit 1be2a1ccac
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F

View file

@ -239,7 +239,10 @@ public class PlayerEntity extends LivingEntity {
@Override
public Vector3i setBedPosition(EntityMetadata<Optional<Vector3i>, ?> 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) {