2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-03-03 09:46:26 +00:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
2016-02-29 23:09:49 +00:00
|
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-05-06 09:48:49 +00:00
|
|
|
index 2845686411615245137cfe1a155088a865a4d3a0..8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2019-10-26 22:55:58 +00:00
|
|
|
@@ -113,4 +113,10 @@ public class PaperWorldConfig {
|
2016-02-29 23:09:49 +00:00
|
|
|
softDespawnDistance = softDespawnDistance*softDespawnDistance;
|
|
|
|
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean keepSpawnInMemory;
|
|
|
|
+ private void keepSpawnInMemory() {
|
|
|
|
+ keepSpawnInMemory = getBoolean("keep-spawn-loaded", true);
|
|
|
|
+ log("Keep spawn chunk loaded: " + keepSpawnInMemory);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2020-08-25 02:22:08 +00:00
|
|
|
index 998eb1cadc40878ec6fda7963adcdf8c49154cea..1ad366de6d2857edb6d12006e8db11845cdf30d8 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2020-08-25 02:22:08 +00:00
|
|
|
@@ -165,6 +165,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
2019-04-24 01:00:24 +00:00
|
|
|
});
|
2016-03-03 09:46:26 +00:00
|
|
|
// CraftBukkit end
|
2016-03-25 04:59:37 +00:00
|
|
|
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
2016-02-29 23:09:49 +00:00
|
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
2019-04-24 01:00:24 +00:00
|
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
2016-02-29 23:09:49 +00:00
|
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
2016-03-25 04:59:37 +00:00
|
|
|
}
|