diff options
author | madmaxoft <github@xoft.cz> | 2014-08-12 11:10:32 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-08-12 11:10:32 +0200 |
commit | 3020e8cc05a0732ee880ab16bbab66e4e9b72dd7 (patch) | |
tree | b373615f2008cee45301ac1756d18396c161ae05 /src/Generating/StructGen.h | |
parent | Fixed unchecked return values. (diff) | |
parent | Merge pull request #1316 from ChriPiv/master (diff) | |
download | cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar.gz cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar.bz2 cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar.lz cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar.xz cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.tar.zst cuberite-3020e8cc05a0732ee880ab16bbab66e4e9b72dd7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/StructGen.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/Generating/StructGen.h b/src/Generating/StructGen.h index 9176bc192..55d5bc1c7 100644 --- a/src/Generating/StructGen.h +++ b/src/Generating/StructGen.h @@ -76,11 +76,29 @@ class cStructGenOreNests : public cFinishGen { public: - cStructGenOreNests(int a_Seed) : m_Noise(a_Seed), m_Seed(a_Seed) {} - + struct OreInfo + { + BLOCKTYPE BlockType; // The type of the nest. + int MaxHeight; // The highest possible a nest can occur + int NumNests; // How many nests per chunk + int NestSize; // The amount of blocks a nest can have. + }; + + typedef std::vector<OreInfo> OreList; + + cStructGenOreNests(int a_Seed, OreList a_OreList, BLOCKTYPE a_ToReplace) : + m_Noise(a_Seed), + m_Seed(a_Seed), + m_OreList(a_OreList), + m_ToReplace(a_ToReplace) + {} + protected: - cNoise m_Noise; - int m_Seed; + cNoise m_Noise; + int m_Seed; + + OreList m_OreList; // A list of possible ores. + BLOCKTYPE m_ToReplace; // cFinishGen override: virtual void GenFinish(cChunkDesc & a_ChunkDesc) override; |