2015-01-29 21:26:20 +00:00
|
|
|
From b430bd06929b4b872c2c1dfd006f01d2eabb1c68 Mon Sep 17 00:00:00 2001
|
2014-07-08 23:00:00 +00:00
|
|
|
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
2014-11-28 01:17:45 +00:00
|
|
|
Date: Fri, 28 Nov 2014 01:53:14 -0600
|
2014-07-10 18:46:25 +00:00
|
|
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
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
|
2015-01-29 21:26:20 +00:00
|
|
|
index bebf181..66e85cb 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-11-29 19:23:36 +00:00
|
|
|
@@ -216,6 +216,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 );
|
2014-11-28 01:17:45 +00:00
|
|
|
this.chunkTickList = new 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
|
2014-11-28 01:17:45 +00:00
|
|
|
index 522a214..00303dc 100644
|
2014-07-08 23:00:00 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-11-28 01:17:45 +00:00
|
|
|
@@ -139,4 +139,11 @@ public class PaperSpigotWorldConfig
|
2014-07-08 23:00:00 +00:00
|
|
|
softDespawnDistance = softDespawnDistance*softDespawnDistance;
|
|
|
|
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
|
|
|
|
}
|
2014-11-28 01:17:45 +00:00
|
|
|
+
|
2014-07-08 23:00:00 +00:00
|
|
|
+ public boolean keepSpawnInMemory;
|
|
|
|
+ private void keepSpawnInMemory()
|
|
|
|
+ {
|
|
|
|
+ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
|
|
|
|
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-01-29 21:26:20 +00:00
|
|
|
1.9.5.msysgit.0
|
2014-07-08 23:00:00 +00:00
|
|
|
|