diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/MobCategory.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/MobCategory.cpp')
| -rw-r--r-- | Minecraft.World/MobCategory.cpp | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/Minecraft.World/MobCategory.cpp b/Minecraft.World/MobCategory.cpp index 787b2004..507be6ed 100644 --- a/Minecraft.World/MobCategory.cpp +++ b/Minecraft.World/MobCategory.cpp @@ -7,35 +7,38 @@ MobCategory *MobCategory::monster = NULL; MobCategory *MobCategory::creature = NULL; +MobCategory *MobCategory::ambient = NULL; MobCategory *MobCategory::waterCreature = NULL; // 4J - added these extra categories MobCategory *MobCategory::creature_wolf = NULL; MobCategory *MobCategory::creature_chicken = NULL; MobCategory *MobCategory::creature_mushroomcow = NULL; -MobCategoryArray MobCategory::values = MobCategoryArray(6); +MobCategoryArray MobCategory::values = MobCategoryArray(7); void MobCategory::staticCtor() { // 4J - adjusted the max levels here for the xbox version, which now represent the max levels in the whole world - monster = new MobCategory(70, Material::air, false, eTYPE_MONSTER, false, CONSOLE_MONSTERS_HARD_LIMIT); - creature = new MobCategory(10, Material::air, true, eTYPE_ANIMALS_SPAWN_LIMIT_CHECK, false, CONSOLE_ANIMALS_HARD_LIMIT); - waterCreature = new MobCategory(5, Material::water, true, eTYPE_WATERANIMAL, false, CONSOLE_SQUID_HARD_LIMIT); + monster = new MobCategory(70, Material::air, false, false, eTYPE_MONSTER, false, CONSOLE_MONSTERS_HARD_LIMIT); + creature = new MobCategory(10, Material::air, true, true, eTYPE_ANIMALS_SPAWN_LIMIT_CHECK, false, CONSOLE_ANIMALS_HARD_LIMIT); + ambient = new MobCategory(15, Material::air, true, false, eTYPE_AMBIENT, false, CONSOLE_AMBIENT_HARD_LIMIT), + waterCreature = new MobCategory(5, Material::water, true, false, eTYPE_WATERANIMAL, false, CONSOLE_SQUID_HARD_LIMIT); values[0] = monster; values[1] = creature; - values[2] = waterCreature; + values[2] = ambient; + values[3] = waterCreature; // 4J - added 2 new categories to give us better control over spawning wolves & chickens - creature_wolf = new MobCategory(3, Material::air, true, eTYPE_WOLF, true, MAX_XBOX_WOLVES); - creature_chicken = new MobCategory( 2, Material::air, true, eTYPE_CHICKEN, true, MAX_XBOX_CHICKENS); - creature_mushroomcow = new MobCategory(2, Material::air, true, eTYPE_MUSHROOMCOW, true, MAX_XBOX_MUSHROOMCOWS); - values[3] = creature_wolf; - values[4] = creature_chicken; - values[5] = creature_mushroomcow; + creature_wolf = new MobCategory(3, Material::air, true, true, eTYPE_WOLF, true, MAX_XBOX_WOLVES); + creature_chicken = new MobCategory( 2, Material::air, true, true, eTYPE_CHICKEN, true, MAX_XBOX_CHICKENS); + creature_mushroomcow = new MobCategory(2, Material::air, true, true, eTYPE_MUSHROOMCOW, true, MAX_XBOX_MUSHROOMCOWS); + values[4] = creature_wolf; + values[5] = creature_chicken; + values[6] = creature_mushroomcow; } -MobCategory::MobCategory(int maxVar, Material *spawnPositionMaterial, bool isFriendly, eINSTANCEOF eBase, bool isSingleType, int maxPerLevel) - : m_max(maxVar), spawnPositionMaterial(spawnPositionMaterial), m_isFriendly(isFriendly), m_eBase(eBase), m_isSingleType(isSingleType), m_maxPerLevel(maxPerLevel) +MobCategory::MobCategory(int maxVar, Material *spawnPositionMaterial, bool isFriendly, bool isPersistent, eINSTANCEOF eBase, bool isSingleType, int maxPerLevel) + : m_max(maxVar), spawnPositionMaterial(spawnPositionMaterial), m_isFriendly(isFriendly), m_isPersistent(isPersistent), m_eBase(eBase), m_isSingleType(isSingleType), m_maxPerLevel(maxPerLevel) { } @@ -69,3 +72,8 @@ bool MobCategory::isSingleType() { return m_isSingleType; } + +bool MobCategory::isPersistent() +{ + return m_isPersistent; +} |
