From 59a1f78750f5efe44dfc4eacbe763b742a54cfb2 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:52:03 -0500 Subject: [PATCH] Fix sleeping --- .../minecraft/server/level/ServerPlayer.java.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch index 8d5685a16c..debc79d7cc 100644 --- a/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -825,15 +825,15 @@ this.enteredNetherPosition = null; } } -@@ -1110,16 +_,21 @@ - @Override - public Either startSleepInBed(BlockPos at) { - Direction direction = this.level().getBlockState(at).getValue(HorizontalDirectionalBlock.FACING); +@@ -1107,19 +_,18 @@ + this.containerMenu.broadcastChanges(); + } + +- @Override +- public Either startSleepInBed(BlockPos at) { +- Direction direction = this.level().getBlockState(at).getValue(HorizontalDirectionalBlock.FACING); + // CraftBukkit start - moved bed result checks from below into separate method -+ return getBedResult(at, direction); -+ } + private Either getBedResult(BlockPos at, Direction direction) { -+ // CraftBukkit end - moved bed result checks from below into separate method if (this.isSleeping() || !this.isAlive()) { return Either.left(Player.BedSleepingProblem.OTHER_PROBLEM); - } else if (!this.level().dimensionType().natural()) {