diff --git a/Minecraft.Client/Common/App_Defines.h b/Minecraft.Client/Common/App_Defines.h index 97d04b2ce..55658beff 100644 --- a/Minecraft.Client/Common/App_Defines.h +++ b/Minecraft.Client/Common/App_Defines.h @@ -49,7 +49,7 @@ #define GAME_HOST_OPTION_BITMASK_ALL 0xFFFFFFFF #define GAME_HOST_OPTION_BITMASK_WORLDSIZE_BITSHIFT 20 -#define GAME_HOST_OPTION_BITMASK_WORLDMOBCAP_BITSHIFT 28 // Set to this value as there is no other remaining space +#define GAME_HOST_OPTION_BITMASK_WORLDMOBCAP_BITSHIFT 30 // Set to this value as there is no other remaining space enum EGameHostOptionWorldSize { diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index 55b02cb98..004918bbc 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -618,6 +618,7 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW app.SetGameHostOption(eGameHostOption_Difficulty, GetDedicatedServerInt(settings, L"difficulty", app.GetGameHostOption(eGameHostOption_Difficulty))); app.SetGameHostOption(eGameHostOption_GameType, GetDedicatedServerInt(settings, L"gamemode", app.GetGameHostOption(eGameHostOption_GameType))); + app.SetGameHostOption(eGameHostOption_WorldMobCap, GetDedicatedServerInt(settings, L"world-mob-cap", app.GetGameHostOption(eGameHostOption_WorldMobCap))); app.SetGameHostOption(eGameHostOption_Structures, GetDedicatedServerBool(settings, L"generate-structures", app.GetGameHostOption(eGameHostOption_Structures) > 0) ? 1 : 0); app.SetGameHostOption(eGameHostOption_BonusChest, GetDedicatedServerBool(settings, L"bonus-chest", app.GetGameHostOption(eGameHostOption_BonusChest) > 0) ? 1 : 0); app.SetGameHostOption(eGameHostOption_PvP, GetDedicatedServerBool(settings, L"pvp", app.GetGameHostOption(eGameHostOption_PvP) > 0) ? 1 : 0); diff --git a/Minecraft.World/MobCategory.cpp b/Minecraft.World/MobCategory.cpp index d246e3cf8..c5a10d387 100644 --- a/Minecraft.World/MobCategory.cpp +++ b/Minecraft.World/MobCategory.cpp @@ -5,6 +5,33 @@ #include "Material.h" #include "MobCategory.h" +int MobCategory::maxNaturalMonsters = 0; +int MobCategory::maxNaturalAnimals = 0; +int MobCategory::maxNaturalAmbient = 0; +int MobCategory::maxNaturalSquid = 0; +int MobCategory::maxNaturalChickens = 0; +int MobCategory::maxNaturalWolves = 0; +int MobCategory::maxNaturalMushroomCows = 0; + +int MobCategory::maxSnowGolems = 0; +int MobCategory::maxIronGolems = 0; +int MobCategory::maxBosses = 0; + +int MobCategory::maxAnimalsWithBreeding = 0; +int MobCategory::maxChickensWithBreeding = 0; +int MobCategory::maxMushroomCowsWithBreeding = 0; +int MobCategory::maxWolvesWithBreeding = 0; +int MobCategory::maxVillagersWithBreeding = 0; + +int MobCategory::maxAnimalsWithSpawnEgg = 0; +int MobCategory::maxChickensWithSpawnEgg = 0; +int MobCategory::maxWolvesWithSpawnEgg = 0; +int MobCategory::maxMonstersWithSpawnEgg = 0; +int MobCategory::maxVillagersWithSpawnEgg = 0; +int MobCategory::maxMushroomCowsWithSpawnEgg = 0; +int MobCategory::maxSquidsWithSpawnEgg = 0; +int MobCategory::maxAmbientWithSpawnEgg = 0; + MobCategory *MobCategory::monster = NULL; MobCategory *MobCategory::creature = NULL; MobCategory *MobCategory::ambient = NULL;