Fix Mob Spawning Relative to View Distance

Changes the mob spawning algorithm to properly account for view distance and the range around players.

Needs better documentation.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2013-06-21 17:29:54 +10:00
parent 78524cb95e
commit 19bfb10583
3 changed files with 85 additions and 7 deletions

View File

@@ -180,4 +180,11 @@ public class SpigotWorldConfig
this.log( "Simulation Distance: " + this.simulationDistance );
}
public byte mobSpawnRange;
private void mobSpawnRange()
{
this.mobSpawnRange = (byte) this.getInt( "mob-spawn-range", 6 );
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
}
}