From 60bcc06f43e0c249204149153976e534b239d138 Mon Sep 17 00:00:00 2001 From: Mat Date: Sat, 4 Apr 2020 14:44:17 +0300 Subject: Implement wither skeletons (#4563) --- src/MobSpawner.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/MobSpawner.cpp') 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 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; } -- cgit v1.2.3