diff options
author | Mat <mail@mathias.is> | 2020-04-04 13:44:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 13:44:17 +0200 |
commit | 60bcc06f43e0c249204149153976e534b239d138 (patch) | |
tree | dc3178edca8b8a0ad77b6002621fd5765398d8e6 /src/MobSpawner.cpp | |
parent | Manage block entity lifetime with unique_ptr (#4080) (diff) | |
download | cuberite-60bcc06f43e0c249204149153976e534b239d138.tar cuberite-60bcc06f43e0c249204149153976e534b239d138.tar.gz cuberite-60bcc06f43e0c249204149153976e534b239d138.tar.bz2 cuberite-60bcc06f43e0c249204149153976e534b239d138.tar.lz cuberite-60bcc06f43e0c249204149153976e534b239d138.tar.xz cuberite-60bcc06f43e0c249204149153976e534b239d138.tar.zst cuberite-60bcc06f43e0c249204149153976e534b239d138.zip |
Diffstat (limited to '')
-rw-r--r-- | src/MobSpawner.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp index 73531f2fc..4d18b7358 100644 --- a/src/MobSpawner.cpp +++ b/src/MobSpawner.cpp @@ -287,6 +287,18 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, eMonsterType ); } + case mtWitherSkeleton: + { + return ( + (targetBlock == E_BLOCK_AIR) && + (blockAbove == E_BLOCK_AIR) && + (!cBlockInfo::IsTransparent(blockBelow)) && + (skyLight <= 7) && + (blockLight <= 7) && + (random.RandBool(0.6)) + ); + } + case mtWolf: { return ( @@ -443,6 +455,7 @@ std::set<eMonsterType> cMobSpawner::GetAllowedMobTypes(EMCSBiome a_Biome) ListOfSpawnables.insert(mtBlaze); ListOfSpawnables.insert(mtGhast); ListOfSpawnables.insert(mtMagmaCube); + ListOfSpawnables.insert(mtWitherSkeleton); ListOfSpawnables.insert(mtZombiePigman); return ListOfSpawnables; @@ -461,7 +474,11 @@ cMonster * cMobSpawner::TryToSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, EMCS { return nullptr; } - if (m_MobType == mtWolf) + if (m_MobType == mtWitherSkeleton) + { + a_MaxPackSize = 5; + } + else if (m_MobType == mtWolf) { a_MaxPackSize = 8; } |