summaryrefslogtreecommitdiffstats
path: root/src/Generating/StructGen.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-11 12:10:20 +0200
committerMattes D <github@xoft.cz>2014-08-11 12:10:20 +0200
commit54cf69a634a6acfccebaf1479db6bad269bf82d9 (patch)
treea2b405ec4d09ae1fe50f36e030425e32b5b6db03 /src/Generating/StructGen.h
parentMerge pull request #1312 from mc-server/unnamed-enum (diff)
parentBunch of tweaks: (diff)
downloadcuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar.gz
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar.bz2
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar.lz
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar.xz
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.tar.zst
cuberite-54cf69a634a6acfccebaf1479db6bad269bf82d9.zip
Diffstat (limited to 'src/Generating/StructGen.h')
-rw-r--r--src/Generating/StructGen.h26
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;