diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-14 10:52:57 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-14 10:52:57 +0100 |
commit | ff403fdbf0b4c372057fc8369797ddf652cfd727 (patch) | |
tree | 0f9f22c6a8ea41e879cbd49011ccd2c9f25d2604 /source/Generating/FinishGen.h | |
parent | Changed DelayedFluidSimulatorData to be a vector rather than a list, performance doubled :) (diff) | |
download | cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar.gz cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar.bz2 cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar.lz cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar.xz cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.tar.zst cuberite-ff403fdbf0b4c372057fc8369797ddf652cfd727.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Generating/FinishGen.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/Generating/FinishGen.h b/source/Generating/FinishGen.h index 573060843..dde073f67 100644 --- a/source/Generating/FinishGen.h +++ b/source/Generating/FinishGen.h @@ -17,6 +17,7 @@ #include "ComposableGenerator.h" #include "../Noise.h" +#include "../ProbabDistrib.h" @@ -223,3 +224,39 @@ protected: + +class cFinishGenFluidSprings : + public cFinishGen +{ +public: + cFinishGenFluidSprings(int a_Seed, BLOCKTYPE a_Fluid, cIniFile & a_IniFile, const cWorld & a_World); + +protected: + + cNoise m_Noise; + cProbabDistrib m_HeightDistribution; + BLOCKTYPE m_Fluid; + int m_Chance; ///< Chance, [0..100], that a spring will be generated in a chunk + + // cFinishGen override: + virtual void GenFinish( + int a_ChunkX, int a_ChunkZ, + cChunkDef::BlockTypes & a_BlockTypes, // Block types to read and change + cChunkDef::BlockNibbles & a_BlockMeta, // Block meta to read and change + cChunkDef::HeightMap & a_HeightMap, // Height map to read and change by the current data + const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to + cEntityList & a_Entities, // Entities may be added or deleted + cBlockEntityList & a_BlockEntities // Block entities may be added or deleted + ) override; + + /// Tries to place a spring at the specified coords, checks neighbors. Returns true if successful + bool TryPlaceSpring( + cChunkDef::BlockTypes & a_BlockTypes, + cChunkDef::BlockNibbles & a_BlockMetas, + int x, int y, int z + ); +} ; + + + + |