diff options
author | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-12-02 10:37:17 +0100 |
---|---|---|
committer | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-12-02 10:37:17 +0100 |
commit | 9831220a1cfc84804619e497f8b56853de98bf82 (patch) | |
tree | ad9ca2f6635d822f8f7d6be5d2cb2e63a3476491 /src/Generating/FinishGen.h | |
parent | Merge pull request #1636 from mc-server/MineshaftSpawners (diff) | |
download | cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar.gz cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar.bz2 cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar.lz cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar.xz cuberite-9831220a1cfc84804619e497f8b56853de98bf82.tar.zst cuberite-9831220a1cfc84804619e497f8b56853de98bf82.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/FinishGen.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h index d45365683..38bb93d2a 100644 --- a/src/Generating/FinishGen.h +++ b/src/Generating/FinishGen.h @@ -18,6 +18,8 @@ #include "ComposableGenerator.h" #include "../Noise/Noise.h" #include "../ProbabDistrib.h" +#include "../Mobs/Monster.h" +#include "FastRandom.h" @@ -315,3 +317,30 @@ protected: + +class cFinishGenPassiveMobs : + public cFinishGen +{ +public: + + cFinishGenPassiveMobs(int a_Seed, cIniFile & a_IniFile, eDimension a_Dimension); + +protected: + + cNoise m_Noise; + int m_AnimalProbability; // Chance, [0..100], that an animal pack will be generated in a chunk + cFastRandom m_Random; + + // cFinishGen override: + virtual void GenFinish(cChunkDesc & a_ChunkDesc) override; + + // Tries to spawn a mob in the center of the pack. If successful, spawns 0-5 more. + bool TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int x, int y, int z, eMonsterType AnimalToSpawn); + + // Gets a random mob from biome-dependant list + eMonsterType GetRandomMob(cChunkDesc & a_ChunkDesc); +} ; + + + + |