29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From 2bb588c4a9d3dbc9f92296114a05327837b9582b Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Fri, 11 Jan 2013 14:54:51 -0500
|
|
Subject: [PATCH 11/15] Fix mob-spawn-radius setting so that its actually
|
|
used...
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/SpawnerCreature.java | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
index 576cbd3..1e4a1a5 100644
|
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
@@ -37,7 +37,10 @@ public final class SpawnerCreature {
|
|
int j;
|
|
// Spigot start - limit radius to spawn distance (chunks aren't loaded)
|
|
if (spawnRadius == 0) {
|
|
- spawnRadius = (byte) worldserver.getServer().getViewDistance();
|
|
+ spawnRadius = (byte) worldserver.getWorld().mobSpawnRange;
|
|
+ if (spawnRadius > (byte) worldserver.getServer().getViewDistance()) {
|
|
+ spawnRadius = (byte) worldserver.getServer().getViewDistance();
|
|
+ }
|
|
if (spawnRadius > 8) {
|
|
spawnRadius = 8;
|
|
}
|
|
--
|
|
1.8.1-rc2
|
|
|