mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Fixes #760
Changed to use the inbuilt SetTimePacket in the normal server tick. Also changed some logic around to make the feature slightly more optimized.
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Customizable sleeping actionbar messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2eba2af9bb3fb0aaa9b2f5af6ae5fd207e1db93d..40466cdbd97228662a1eeb3bb08e8172bf344410 100644
|
||||
index 474bb004678d9482a3fc5c00b2bcf3f3a293f217..5a42fde11c219a1572bf31663487ff1fff0d1312 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -945,11 +945,29 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -949,11 +949,29 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (this.canSleepThroughNights()) {
|
||||
if (!this.getServer().isSingleplayer() || this.getServer().isPublished()) {
|
||||
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
||||
@@ -40,7 +40,7 @@ index 2eba2af9bb3fb0aaa9b2f5af6ae5fd207e1db93d..40466cdbd97228662a1eeb3bb08e8172
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 0ccb09e9c00f7434f4158001c983ab547c7b56e0..049bf902e8e77d7eac8dc868593c215bf04838a9 100644
|
||||
index ad8d92f04524fa6e7a7a4c390e8b744889dae968..e230f65d8599f1d6f8c567227859935a905426f8 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -168,6 +168,8 @@ public class PurpurConfig {
|
||||
|
||||
Reference in New Issue
Block a user