2014-07-21 23:52:19 +00:00
|
|
|
From ef87dbbaa845be4b480f2ec851c9dcab75d579e3 Mon Sep 17 00:00:00 2001
|
2014-07-08 23:00:00 +00:00
|
|
|
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
2014-07-10 18:46:25 +00:00
|
|
|
Date: Thu, 10 Jul 2014 16:57:10 +0100
|
|
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
2014-07-08 23:00:00 +00:00
|
|
|
|
2014-07-10 18:46:25 +00:00
|
|
|
Now with 100% more confirmed working by creator
|
2014-07-08 23:00:00 +00:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2014-07-21 23:52:19 +00:00
|
|
|
index 4326dd7..db025bf 100644
|
2014-07-08 23:00:00 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2014-07-21 23:52:19 +00:00
|
|
|
@@ -222,6 +222,7 @@ public abstract class World implements IBlockAccess {
|
2014-07-10 18:46:25 +00:00
|
|
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
|
|
|
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
|
|
|
// CraftBukkit end
|
|
|
|
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
|
|
|
|
// Spigot start
|
|
|
|
this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 );
|
|
|
|
this.chunkTickList = new net.minecraft.util.gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
|
2014-07-08 23:00:00 +00:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
index e627c4e..39bbd62 100644
|
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig
|
|
|
|
softDespawnDistance = softDespawnDistance*softDespawnDistance;
|
|
|
|
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean keepSpawnInMemory;
|
|
|
|
+ private void keepSpawnInMemory()
|
|
|
|
+ {
|
|
|
|
+ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
|
|
|
|
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|