Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <DungeonRoomsFinisher.h>
Public Member Functions | |
cDungeonRoomsFinisher (cTerrainShapeGen &a_ShapeGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString &a_HeightDistrib) | |
Creates a new dungeon room finisher. More... | |
Public Member Functions inherited from cGridStructGen | |
cGridStructGen (int a_Seed) | |
Creates a new instance that has the generation parameters set to defaults. More... | |
cGridStructGen (int a_Seed, int a_GridSizeX, int a_GridSizeZ, int a_MaxOffsetX, int a_MaxOffsetZ, int a_MaxStructureSizeX, int a_MaxStructureSizeZ, size_t a_MaxCacheSize) | |
virtual void | GenFinish (cChunkDesc &a_ChunkDesc) override |
void | SetGeneratorParams (const AStringMap &a_GeneratorParams) |
Sets the generator params based on the dictionary passed in. More... | |
Public Member Functions inherited from cFinishGen | |
virtual | ~cFinishGen () |
Protected Member Functions | |
virtual cStructurePtr | CreateStructure (int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override |
Create a new structure at the specified gridpoint. More... | |
Protected Member Functions inherited from cGridStructGen | |
void | ClearCache (void) |
Clears everything from the cache. More... | |
void | GetStructuresForChunk (int a_ChunkX, int a_ChunkZ, cStructurePtrs &a_Structures) |
Returns all structures that may intersect the given chunk. More... | |
Protected Attributes | |
cProbabDistrib | m_HeightProbability |
The height probability distribution to make the spawners more common in layers 10 - 40, less common outside this range. More... | |
int | m_MaxHalfSize |
Maximum half-size (from center to wall) of the dungeon room's inner (air) area. More... | |
int | m_MinHalfSize |
Minimum half-size (from center to wall) of the dungeon room's inner (air) area. More... | |
cTerrainShapeGen & | m_ShapeGen |
The shape gen that is used for limiting the rooms' Y coords. More... | |
Protected Attributes inherited from cGridStructGen | |
int | m_BaseSeed |
Base seed of the world for which the generator generates chunk. More... | |
cStructurePtrs | m_Cache |
Cache for the most recently generated structures, ordered by the recentness. More... | |
int | m_GridSizeX |
The size of each grid's cell in the X axis. More... | |
int | m_GridSizeZ |
The size of each grid's cell in the Z axis. More... | |
size_t | m_MaxCacheSize |
Maximum allowed sum of costs for items in the cache. More... | |
int | m_MaxOffsetX |
The maximum offset of the structure's origin from the grid midpoint, in X coord. More... | |
int | m_MaxOffsetZ |
The maximum offset of the structure's origin from the grid midpoint, in Z coord. More... | |
int | m_MaxStructureSizeX |
Maximum theoretical size of the structure in the X axis. More... | |
int | m_MaxStructureSizeZ |
Maximum theoretical size of the structure in the Z axis. More... | |
cNoise | m_Noise |
The noise used for generating grid offsets. More... | |
int | m_Seed |
Seed for generating grid offsets and also available for descendants. More... | |
Private Types | |
using | Super = cGridStructGen |
Additional Inherited Members | |
Public Types inherited from cGridStructGen | |
typedef std::shared_ptr< cStructure > | cStructurePtr |
typedef std::list< cStructurePtr > | cStructurePtrs |
Definition at line 19 of file DungeonRoomsFinisher.h.
|
private |
Definition at line 22 of file DungeonRoomsFinisher.h.
cDungeonRoomsFinisher::cDungeonRoomsFinisher | ( | cTerrainShapeGen & | a_ShapeGen, |
int | a_Seed, | ||
int | a_GridSize, | ||
int | a_MaxSize, | ||
int | a_MinSize, | ||
const AString & | a_HeightDistrib | ||
) |
Creates a new dungeon room finisher.
a_ShapeGen is the underlying terrain shape generator, so that the rooms can always be placed under the terrain. a_MaxSize and a_MinSize are the maximum and minimum sizes of the room's internal (air) area, in blocks across. a_HeightDistrib is the string defining the height distribution for the rooms (cProbabDistrib format).
Definition at line 290 of file DungeonRoomsFinisher.cpp.
|
overrideprotectedvirtual |
Create a new structure at the specified gridpoint.
Implements cGridStructGen.
Definition at line 311 of file DungeonRoomsFinisher.cpp.
|
protected |
The height probability distribution to make the spawners more common in layers 10 - 40, less common outside this range.
Definition at line 44 of file DungeonRoomsFinisher.h.
|
protected |
Maximum half-size (from center to wall) of the dungeon room's inner (air) area.
Default is 3 (vanilla).
Definition at line 38 of file DungeonRoomsFinisher.h.
|
protected |
Minimum half-size (from center to wall) of the dungeon room's inner (air) area.
Default is 2 (vanilla).
Definition at line 41 of file DungeonRoomsFinisher.h.
|
protected |
The shape gen that is used for limiting the rooms' Y coords.
Definition at line 35 of file DungeonRoomsFinisher.h.