mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-27 07:23:51 +00:00
Remove unnecessary changes
This commit is contained in:
parent
ae138caaf2
commit
e0edd377ce
7 changed files with 24 additions and 78 deletions
|
|
@ -210,15 +210,13 @@ const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFrie
|
|||
}
|
||||
|
||||
// Use variable to not repeat checks
|
||||
int maxInstances = mobCategory->getMaxInstancesPerLevel();
|
||||
int maxInstances = mobCategory->getMaxInstancesPerChunk(); // Merged in values from getMaxInstancesPerLevel(), so changed to use getMaxInstancesPerChunk()
|
||||
// Check for if the mob cap is "off" (works as Java does, scaled by chunk count)
|
||||
bool usesChunkLimit = app.GetGameHostOption(eGameHostOption_NoMobCap);
|
||||
if (usesChunkLimit)
|
||||
{
|
||||
// Use Java logic for the max count instead, accounting for chunks polled and the magic number.
|
||||
maxInstances = mobCategory->getMaxInstancesPerChunk() * chunksToPoll.size() / MAGIC_NUMBER;
|
||||
// Cancel spawning under extra categories, with this option they should be included in creature
|
||||
if (i > 3) continue;
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue