From 98d807187bbaec4cd65dbe7c1ecac0435efb6df0 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Wed, 11 Apr 2018 13:17:30 +0200 Subject: Removed duplicate code (#4198) Should also fix dogs not despawning --- src/MobSpawner.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MobSpawner.h') diff --git a/src/MobSpawner.h b/src/MobSpawner.h index c396637d5..695467692 100644 --- a/src/MobSpawner.h +++ b/src/MobSpawner.h @@ -45,14 +45,14 @@ public : /** Returns true if specified type of mob can spawn on specified block */ static bool CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, eMonsterType a_MobType, EMCSBiome a_Biome); + /** Returns all mob types that can spawn that biome */ + static std::set GetAllowedMobTypes(EMCSBiome a_Biome); + protected : /** Returns a random type that can spawn in the specified biome. Returns mtInvalidType if none is possible. */ eMonsterType ChooseMobType(EMCSBiome a_Biome); - /** Adds toAdd into toAddIn, if toAdd is in m_AllowedTypes */ - void addIfAllowed(eMonsterType toAdd, std::vector & toAddIn); - cMonster::eFamily m_MonsterFamily; std::set m_AllowedTypes; bool m_NewPack; -- cgit v1.2.3