mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Update to 1.15.1
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user