diff options
author | Mattes D <github@xoft.cz> | 2014-05-09 11:16:13 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-09 11:16:13 +0200 |
commit | 95ead1128f85b2f0935c6c0b575a13acbec27b6b (patch) | |
tree | 8c9dc75973f3b61821d212d479394013eff38bef /src/Generating/Caves.h | |
parent | Mineshafts generator rewritten to use GridStructGen. (diff) | |
download | cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar.gz cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar.bz2 cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar.lz cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar.xz cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.tar.zst cuberite-95ead1128f85b2f0935c6c0b575a13acbec27b6b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/Caves.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/Generating/Caves.h b/src/Generating/Caves.h index 2a9fa01b8..254dcddbd 100644 --- a/src/Generating/Caves.h +++ b/src/Generating/Caves.h @@ -12,7 +12,7 @@ #pragma once -#include "ComposableGenerator.h" +#include "GridStructGen.h" #include "../Noise.h" @@ -64,10 +64,12 @@ protected: class cStructGenWormNestCaves : - public cFinishGen + public cGridStructGen { + typedef cGridStructGen super; public: cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) : + super(a_Seed, a_Grid, a_Grid, a_Size + a_MaxOffset, a_Size + a_MaxOffset, 100), m_Noise(a_Seed), m_Size(a_Size), m_MaxOffset(a_MaxOffset), @@ -75,26 +77,16 @@ public: { } - ~cStructGenWormNestCaves(); - protected: class cCaveSystem; // fwd: Caves.cpp - typedef std::list<cCaveSystem *> cCaveSystems; cNoise m_Noise; int m_Size; // relative size of the cave systems' caves. Average number of blocks of each initial tunnel int m_MaxOffset; // maximum offset of the cave nest origin from the grid cell the nest belongs to int m_Grid; // average spacing of the nests - cCaveSystems m_Cache; - - /// Clears everything from the cache - void ClearCache(void); - - /// Returns all caves that *may* intersect the given chunk. All the caves are valid until the next call to this function. - void GetCavesForChunk(int a_ChunkX, int a_ChunkZ, cCaveSystems & a_Caves); - - // cFinishGen override: - virtual void GenFinish(cChunkDesc & a_ChunkDesc) override; + + // cGridStructGen override: + virtual cStructurePtr CreateStructure(int a_OriginX, int a_OriginZ) override; } ; |