2016-03-19 02:10:20 +00:00
|
|
|
From f6e5969f986f2901cc038cfa040cd26caa583bc9 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
|
2016-03-19 02:10:20 +00:00
|
|
|
index f9da7f8..f9a58f9 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
|
2016-03-19 02:10:20 +00:00
|
|
|
@@ -127,4 +127,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
|
2016-03-18 21:41:26 +00:00
|
|
|
index 1c2db29..c31cc0c 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
|
2016-03-06 20:59:17 +00:00
|
|
|
@@ -197,6 +197,7 @@ public abstract class World implements IBlockAccess {
|
|
|
|
});
|
2016-03-03 09:46:26 +00:00
|
|
|
this.getServer().addWorld(this.world);
|
|
|
|
// CraftBukkit end
|
2016-02-29 23:09:49 +00:00
|
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
|
|
|
timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
|
|
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
|
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
|
|
|
--
|
2016-03-18 21:41:26 +00:00
|
|
|
2.7.3
|
2016-02-29 23:09:49 +00:00
|
|
|
|