fix running

This commit is contained in:
Alexandra-Myers 2026-03-07 17:06:26 -05:00
parent 425c978b93
commit 40db2dfe3d
2 changed files with 8 additions and 8 deletions

View file

@ -657,6 +657,11 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
int value = (int)currentValue;
switch((int)sliderId)
{
case eControl_WorldMobCap:
m_sliderWorldMobCap.handleSliderMove(value);
m_params->worldMobCap = value;
m_sliderWorldMobCap.setLabel(UIString::UIString("Mob Cap Size: " + m_iWorldMobCapTitleA[m_params->worldMobCap]));
break;
case eControl_WorldSize:
#ifdef _LARGE_WORLDS
m_sliderWorldSize.handleSliderMove(value);
@ -675,11 +680,6 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
}
#endif
break;
case eControl_WorldMobCap:
m_sliderWorldMobCap.handleSliderMove(value);
m_params->worldMobCap = value;
m_sliderWorldMobCap.setLabel(UIString::UIString("Mob Cap Size: " + m_iWorldMobCapTitleA[m_params->worldMobCap]));
break;
}
}

View file

@ -215,7 +215,7 @@ const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFrie
bool usesChunkLimit = app.GetGameHostOption(eGameHostOption_WorldMobCap) == 3;
if (usesChunkLimit)
{
// Use Java logic for the max count instead, accounting for chunks polled and the size of a chunk.
// Use Java logic for the max count instead, accounting for chunks polled and the magic number.
maxInstances = mobCategory->getMaxInstancesPerChunk() * chunksToPoll.size() / MAGIC_NUMBER;
}
@ -351,7 +351,7 @@ const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFrie
if( level->countInstanceOf(mobType, true) >= maxEndermen ) continue;
}
else if( level->countInstanceOf(mobType, true) >= ( maxInstances / 2 ) ) continue;
{ }
}
mob->moveTo(xx, yy, zz, level->random->nextFloat() * 360, 0);
@ -436,7 +436,7 @@ bool MobSpawner::isSpawnPositionOk(MobCategory *category, Level *level, int x, i
int tt = level->getTile(x, y - 1, z);
return tt != Tile::unbreakable_Id && !level->isSolidBlockingTile(x, y, z) && !level->getMaterial(x, y, z)->isLiquid() && !level->isSolidBlockingTile(x, y + 1, z);
}
}
}
void MobSpawner::postProcessSpawnMobs(Level *level, Biome *biome, int xo, int zo, int cellWidth, int cellHeight, Random *random)
{