diff options
author | Rigby <rigby@onarandombox.com> | 2011-07-27 00:24:27 +0100 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-08-05 15:52:38 -0400 |
commit | 4117d6b65e22adbb0221113b089d6d6528fa33f2 (patch) | |
tree | f3b037414a28e723e65d27a76ae0063ea60ea799 /src/main/java/net/minecraft/server | |
parent | 6ae23e3f033e8dcbf49d4d7067062d322a9a3c7f (diff) | |
download | craftbukkit-4117d6b65e22adbb0221113b089d6d6528fa33f2.tar craftbukkit-4117d6b65e22adbb0221113b089d6d6528fa33f2.tar.gz craftbukkit-4117d6b65e22adbb0221113b089d6d6528fa33f2.tar.lz craftbukkit-4117d6b65e22adbb0221113b089d6d6528fa33f2.tar.xz craftbukkit-4117d6b65e22adbb0221113b089d6d6528fa33f2.zip |
Implemented per world setting to keep the spawn in memory or not.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ChunkProviderServer.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 7 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 0fa2b619..0b232fd1 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -49,7 +49,7 @@ public class ChunkProviderServer implements IChunkProvider { int l = j * 16 + 8 - chunkcoordinates.z; short short1 = 128; - if (k < -short1 || k > short1 || l < -short1 || l > short1) { + if (k < -short1 || k > short1 || l < -short1 || l > short1 || !(this.world.keepSpawnInMemory)) { // CraftBukkit - added 'this.world.keepSpawnInMemory' this.unloadQueue.add(i, j); // CraftBukkit } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index ee8dee66..a5d9d05c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -232,8 +232,9 @@ public class MinecraftServer implements Runnable, ICommandListener { // CraftBukkit start for (int l = 0; l < this.worlds.size(); ++l) { // if (l == 0 || this.propertyManager.getBoolean("allow-nether", true)) { - WorldServer worldserver = this.worlds.get(l); - log.info("Preparing start region for level " + l + " (Seed: " + worldserver.getSeed() + ")"); + WorldServer worldserver = this.worlds.get(l); + log.info("Preparing start region for level " + l + " (Seed: " + worldserver.getSeed() + ")"); + if (worldserver.getWorld().getKeepSpawnInMemory()) { // CraftBukkit end ChunkCoordinates chunkcoordinates = worldserver.getSpawn(); @@ -260,7 +261,7 @@ public class MinecraftServer implements Runnable, ICommandListener { } } } - // } // CraftBukkit + } // CraftBukkit } // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index aacbef13..63ea1588 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -83,6 +83,7 @@ public class World implements IBlockAccess { // CraftBukkit start private final CraftWorld world; public boolean pvpMode; + public boolean keepSpawnInMemory = true; public ChunkGenerator generator; Chunk lastChunkAccessed; int lastXAccessed = Integer.MIN_VALUE; |