mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Fix sleeping
This commit is contained in:
parent
2e14d98ebe
commit
59a1f78750
1 changed files with 7 additions and 7 deletions
|
@ -825,15 +825,15 @@
|
||||||
this.enteredNetherPosition = null;
|
this.enteredNetherPosition = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1110,16 +_,21 @@
|
@@ -1107,19 +_,18 @@
|
||||||
@Override
|
this.containerMenu.broadcastChanges();
|
||||||
public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos at) {
|
}
|
||||||
Direction direction = this.level().getBlockState(at).getValue(HorizontalDirectionalBlock.FACING);
|
|
||||||
|
- @Override
|
||||||
|
- public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos at) {
|
||||||
|
- Direction direction = this.level().getBlockState(at).getValue(HorizontalDirectionalBlock.FACING);
|
||||||
+ // CraftBukkit start - moved bed result checks from below into separate method
|
+ // CraftBukkit start - moved bed result checks from below into separate method
|
||||||
+ return getBedResult(at, direction);
|
|
||||||
+ }
|
|
||||||
+ private Either<Player.BedSleepingProblem, Unit> getBedResult(BlockPos at, Direction direction) {
|
+ private Either<Player.BedSleepingProblem, Unit> getBedResult(BlockPos at, Direction direction) {
|
||||||
+ // CraftBukkit end - moved bed result checks from below into separate method
|
|
||||||
if (this.isSleeping() || !this.isAlive()) {
|
if (this.isSleeping() || !this.isAlive()) {
|
||||||
return Either.left(Player.BedSleepingProblem.OTHER_PROBLEM);
|
return Either.left(Player.BedSleepingProblem.OTHER_PROBLEM);
|
||||||
- } else if (!this.level().dimensionType().natural()) {
|
- } else if (!this.level().dimensionType().natural()) {
|
||||||
|
|
Loading…
Reference in a new issue