mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 23:29:32 +01:00
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index 476b513e05a8ef099a17db44732ebc8eed8a595c..a72b84cdf2b5f4aea5eb7fe4dfc0faad27c46876 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -403,6 +403,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
this.dragonFight = null;
|
|
}
|
|
|
|
+ // Paper start - keep spawn loaded
|
|
+ if (this.paperConfig().spawn.keepSpawnLoaded && this.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS) == 0) {
|
|
+ this.getGameRules().getRule(GameRules.RULE_SPAWN_CHUNK_RADIUS).set(this.paperConfig().spawn.keepSpawnLoadedRange, this);
|
|
+ }
|
|
+ // Paper end - keep spawn loaded
|
|
+
|
|
this.sleepStatus = new SleepStatus();
|
|
this.gameEventDispatcher = new GameEventDispatcher(this);
|
|
this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> {
|