mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-07 14:28:58 +00:00
Use accurate name for the magic number
This commit is contained in:
parent
949411760c
commit
425c978b93
|
|
@ -216,7 +216,7 @@ const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFrie
|
|||
if (usesChunkLimit)
|
||||
{
|
||||
// Use Java logic for the max count instead, accounting for chunks polled and the size of a chunk.
|
||||
maxInstances = mobCategory->getMaxInstancesPerChunk() * chunksToPoll.size() / CHUNK_HORIZONTAL_SCALE;
|
||||
maxInstances = mobCategory->getMaxInstancesPerChunk() * chunksToPoll.size() / MAGIC_NUMBER;
|
||||
}
|
||||
|
||||
// 4J - this is now quite different to the java version. We just have global max counts for the level whereas the original has a max per chunk that
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class MobSpawner
|
|||
{
|
||||
private:
|
||||
// For some reason, this constant is used in Java as the dividend for the max count of a mob category in the level, thus this is done to keep parity.
|
||||
static const int CHUNK_HORIZONTAL_SCALE = 289;
|
||||
static const int MAGIC_NUMBER = 289;
|
||||
static const int MIN_SPAWN_DISTANCE;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Reference in a new issue