Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <FinishGen.h>
Public Member Functions | |
cFinishGenOrePockets (int a_Seed, const OreInfos &a_OreInfos) | |
void | Initialize (cIniFile &a_IniFile, const AString &a_GenName) |
Reads the configuration from the specified INI file. More... | |
Public Member Functions inherited from cFinishGenOres | |
cFinishGenOres (int a_Seed, const OreInfos &a_OreInfos) | |
virtual void | GenFinish (cChunkDesc &a_ChunkDesc) override |
void | SetSeed (int a_Seed) |
(Re-)sets the seed used by the internal generating mechanisms. More... | |
Public Member Functions inherited from cFinishGen | |
virtual | ~cFinishGen () |
Protected Member Functions | |
virtual void | GenerateOre (cChunkDesc &a_ChunkDesc, BLOCKTYPE a_OreType, NIBBLETYPE a_OreMeta, int a_MaxNestHeight, int a_NumNests, int a_NestSize, int a_Seq) override |
Generates a single ore in the specified chunk image. More... | |
void | imprintChunkOrePockets (int a_ChunkX, int a_ChunkZ, cChunkDesc &a_ChunkDesc, BLOCKTYPE a_OreType, NIBBLETYPE a_OreMeta, int a_MaxHeight, int a_NumNests, int a_NestSize, int a_Seq) |
Calculates the pockets for the specified chunk and imprints them into the specified ChunkDesc (not necessarily the same chunk). More... | |
void | imprintPocket (cChunkDesc &a_ChunkDesc, int a_MinPocketX, int a_PocketY, int a_MinPocketZ, int a_NestSize, int a_Seq, BLOCKTYPE a_OreType, NIBBLETYPE a_OreMeta) |
Imprints a single pocket of the specified ore at the specified coords into the chunk. More... | |
void | imprintSphere (cChunkDesc &a_ChunkDesc, double a_SphereX, double a_SphereY, double a_SphereZ, double a_Radius, BLOCKTYPE a_OreType, NIBBLETYPE a_OreMeta) |
Imprints a single sphere of the specified ore at the specified coords. More... | |
Private Types | |
using | Super = cFinishGenOres |
Additional Inherited Members | |
Public Types inherited from cFinishGenOres | |
typedef std::vector< OreInfo > | OreInfos |
Static Public Member Functions inherited from cFinishGenOres | |
static const OreInfos & | DefaultNaturalPatches (void) |
Returns a vector of OreInfo structures describing the default Overworld non-ore pockets (dirt, diorite etc), usable in the constructor. More... | |
static const OreInfos & | DefaultNetherOres (void) |
Returns a vector of OreInfo structures describing the default Nether ores, usable in the constructor. More... | |
static const OreInfos & | DefaultOverworldOres (void) |
Returns a vector of OreInfo structures describing the default Overworld ores, usable in the constructor. More... | |
static OreInfos | OreInfosFromString (const AString &a_OreInfosString) |
Parses the parameter string into OreInfos array. More... | |
static AString | OreInfosToString (const OreInfos &a_OreInfos) |
Returns a string that represents the OreInfos given as the parameter. More... | |
Protected Attributes inherited from cFinishGenOres | |
cNoise | m_Noise |
The noise used for generating. More... | |
OreInfos | m_OreInfos |
All the ores enabled in this generator. More... | |
Definition at line 581 of file FinishGen.h.
|
private |
Definition at line 584 of file FinishGen.h.
|
inline |
Definition at line 588 of file FinishGen.h.
|
overrideprotectedvirtual |
Generates a single ore in the specified chunk image.
a_Seq is the sequencing number (used as a complement to seed to make each ore in the same chunk have different nests)
Implements cFinishGenOres.
Definition at line 2066 of file FinishGen.cpp.
|
protected |
Calculates the pockets for the specified chunk and imprints them into the specified ChunkDesc (not necessarily the same chunk).
a_Seq is the sequence number of the ore, to provide another source of randomness.
Definition at line 2089 of file FinishGen.cpp.
|
protected |
Imprints a single pocket of the specified ore at the specified coords into the chunk.
The pocket shape has its minimum X and Z coords specified, Y can be anywhere around the specified Y coord. a_Seq is the sequence number of the ore, to provide another source of randomness.
Definition at line 2122 of file FinishGen.cpp.
|
protected |
Imprints a single sphere of the specified ore at the specified coords.
Definition at line 2164 of file FinishGen.cpp.
Reads the configuration from the specified INI file.
a_GenName is the name of the generator (this class may be used for OrePockets and DirtPockets, each has a different default).
Definition at line 2042 of file FinishGen.cpp.