diff --git a/Minecraft.World/MobSpawner.cpp b/Minecraft.World/MobSpawner.cpp index a6659b947..44feb913f 100644 --- a/Minecraft.World/MobSpawner.cpp +++ b/Minecraft.World/MobSpawner.cpp @@ -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 diff --git a/Minecraft.World/MobSpawner.h b/Minecraft.World/MobSpawner.h index 153002537..8f1e32179 100644 --- a/Minecraft.World/MobSpawner.h +++ b/Minecraft.World/MobSpawner.h @@ -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: