Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Static Public Member Functions | List of all members
cBiomeGen Class Referenceabstract

The interface that a biome generator must implement A biome generator takes chunk coords on input and outputs an array of biome indices for that chunk on output. More...

#include <ComposableGenerator.h>

Inheritance diagram for cBiomeGen:
Inheritance graph
[legend]

Public Member Functions

virtual void GenBiomes (cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap)=0
 Generates biomes for the given chunk. More...
 
virtual void InitializeBiomeGen (cIniFile &a_IniFile)
 Reads parameters from the ini file, prepares generator for use. More...
 
virtual ~cBiomeGen ()
 

Static Public Member Functions

static std::unique_ptr< cBiomeGenCreateBiomeGen (cIniFile &a_IniFile, int a_Seed, bool &a_CacheOffByDefault)
 Creates the correct BiomeGen descendant based on the ini file settings. More...
 

Detailed Description

The interface that a biome generator must implement A biome generator takes chunk coords on input and outputs an array of biome indices for that chunk on output.

The output array is sequenced in the same way as the MapChunk packet's biome data.

Definition at line 42 of file ComposableGenerator.h.

Constructor & Destructor Documentation

◆ ~cBiomeGen()

virtual cBiomeGen::~cBiomeGen ( )
inlinevirtual

Definition at line 45 of file ComposableGenerator.h.

Member Function Documentation

◆ CreateBiomeGen()

std::unique_ptr< cBiomeGen > cBiomeGen::CreateBiomeGen ( cIniFile a_IniFile,
int  a_Seed,
bool &  a_CacheOffByDefault 
)
static

Creates the correct BiomeGen descendant based on the ini file settings.

a_Seed is the seed read from the INI file. a_CacheOffByDefault gets set to whether the cache should be disabled by default. Used in BiomeVisualiser, too. Implemented in BioGen.cpp!

Definition at line 1136 of file BioGen.cpp.

◆ GenBiomes()

virtual void cBiomeGen::GenBiomes ( cChunkCoords  a_ChunkCoords,
cChunkDef::BiomeMap a_BiomeMap 
)
pure virtual

◆ InitializeBiomeGen()

virtual void cBiomeGen::InitializeBiomeGen ( cIniFile a_IniFile)
inlinevirtual

Reads parameters from the ini file, prepares generator for use.

Reimplemented in cBioGenTwoLevel, cBioGenMultiStepMap, cBioGenDistortedVoronoi, cBioGenVoronoi, cBioGenCheckerboard, cBioGenMulticache, cBioGenCache, and cBioGenConstant.

Definition at line 51 of file ComposableGenerator.h.


The documentation for this class was generated from the following files: