Update to 1.15.1

This commit is contained in:
William Blake Galbreath
2019-12-17 19:41:51 -06:00
parent 3984c3706f
commit bdb7592c66
9 changed files with 41 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
From 91cca1e9d85a776b1aeff360f49c93eeae35371d Mon Sep 17 00:00:00 2001
From 8294e0cf990d69e2a72ccfe927bbaa4d4b8bffb2 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 30 Nov 2019 03:30:17 -0600
Subject: [PATCH] Add sleep options
@@ -9,7 +9,7 @@ Subject: [PATCH] Add sleep options
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 2ec3e660b3..9d7122632b 100644
index f405f0169..cb5f51638 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -14,6 +14,11 @@ import java.util.OptionalInt;
@@ -47,7 +47,7 @@ index 2ec3e660b3..9d7122632b 100644
+ } catch (ScriptException ignore) {
+ }
+ }
+ return world.isDayTime();
+ return world.isDay();
+ }
+ // Purpur end
+
@@ -58,7 +58,7 @@ index 2ec3e660b3..9d7122632b 100644
this.sleepTicks = 100;
}
- if (!this.world.isClientSide && this.world.J()) {
- if (!this.world.isClientSide && this.world.isDay()) {
+ if (!this.world.isClientSide && unableToSleepRightNow()) { // Purpur
this.wakeup(false, true);
}
@@ -67,13 +67,13 @@ index 2ec3e660b3..9d7122632b 100644
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
}
- if (this.world.J()) {
- if (this.world.isDay()) {
+ if (unableToSleepRightNow()) { // Purpur
this.setRespawnPosition(blockposition, false, true);
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_NOW);
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index a1237c5b9d..f61ed338ce 100644
index a1237c5b9..f61ed338c 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -161,6 +161,13 @@ public class PurpurWorldConfig {