mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
fix running
This commit is contained in:
parent
425c978b93
commit
40db2dfe3d
|
|
@ -657,6 +657,11 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
|
||||||
int value = (int)currentValue;
|
int value = (int)currentValue;
|
||||||
switch((int)sliderId)
|
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:
|
case eControl_WorldSize:
|
||||||
#ifdef _LARGE_WORLDS
|
#ifdef _LARGE_WORLDS
|
||||||
m_sliderWorldSize.handleSliderMove(value);
|
m_sliderWorldSize.handleSliderMove(value);
|
||||||
|
|
@ -675,11 +680,6 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ const int MobSpawner::tick(ServerLevel *level, bool spawnEnemies, bool spawnFrie
|
||||||
bool usesChunkLimit = app.GetGameHostOption(eGameHostOption_WorldMobCap) == 3;
|
bool usesChunkLimit = app.GetGameHostOption(eGameHostOption_WorldMobCap) == 3;
|
||||||
if (usesChunkLimit)
|
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;
|
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;
|
if( level->countInstanceOf(mobType, true) >= maxEndermen ) continue;
|
||||||
}
|
}
|
||||||
else if( level->countInstanceOf(mobType, true) >= ( maxInstances / 2 ) ) continue;
|
else if( level->countInstanceOf(mobType, true) >= ( maxInstances / 2 ) ) continue;
|
||||||
{ }
|
}
|
||||||
|
|
||||||
mob->moveTo(xx, yy, zz, level->random->nextFloat() * 360, 0);
|
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);
|
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);
|
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)
|
void MobSpawner::postProcessSpawnMobs(Level *level, Biome *biome, int xo, int zo, int cellWidth, int cellHeight, Random *random)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue