From 40db2dfe3d034025887385d9ac63339ff93b204a Mon Sep 17 00:00:00 2001 From: Alexandra-Myers Date: Sat, 7 Mar 2026 17:06:26 -0500 Subject: [PATCH] fix running --- .../Common/UI/UIScene_LaunchMoreOptionsMenu.cpp | 10 +++++----- Minecraft.World/MobSpawner.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index af731bdc1..7bded2422 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -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; } } diff --git a/Minecraft.World/MobSpawner.cpp b/Minecraft.World/MobSpawner.cpp index 44feb913f..d3164deb2 100644 --- a/Minecraft.World/MobSpawner.cpp +++ b/Minecraft.World/MobSpawner.cpp @@ -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) {