#include <mapgen_flat.h>
Public Member Functions | |
MapgenFlat (MapgenFlatParams *params, EmergeParams *emerge) | |
~MapgenFlat () | |
virtual MapgenType | getType () const |
virtual void | makeChunk (BlockMakeData *data) |
int | getSpawnLevelAtPoint (v2s16 p) |
s16 | generateTerrain () |
Public Member Functions inherited from MapgenBasic | |
MapgenBasic (int mapgenid, MapgenParams *params, EmergeParams *emerge) | |
virtual | ~MapgenBasic () |
virtual void | generateBiomes () |
virtual void | dustTopNodes () |
virtual void | generateCavesNoiseIntersection (s16 max_stone_y) |
virtual void | generateCavesRandomWalk (s16 max_stone_y, s16 large_cave_ymax) |
virtual bool | generateCavernsNoise (s16 max_stone_y) |
virtual void | generateDungeons (s16 max_stone_y) |
Public Member Functions inherited from Mapgen | |
Mapgen ()=default | |
Mapgen (int mapgenid, MapgenParams *params, EmergeParams *emerge) | |
virtual | ~Mapgen () |
DISABLE_CLASS_COPY (Mapgen) | |
s16 | findGroundLevel (v2s16 p2d, s16 ymin, s16 ymax) |
s16 | findLiquidSurface (v2s16 p2d, s16 ymin, s16 ymax) |
void | updateHeightmap (v3s16 nmin, v3s16 nmax) |
void | getSurfaces (v2s16 p2d, s16 ymin, s16 ymax, std::vector< s16 > &floors, std::vector< s16 > &ceilings) |
void | updateLiquid (UniqueQueue< v3s16 > *trans_liquid, v3s16 nmin, v3s16 nmax) |
void | setLighting (u8 light, v3s16 nmin, v3s16 nmax) |
Set light in entire area to fixed value. | |
void | calcLighting (v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax, bool propagate_shadow=true) |
Run all lighting calculations. | |
void | propagateSunlight (v3s16 nmin, v3s16 nmax, bool propagate_shadow) |
Spread sunlight from the area above downwards. | |
void | spreadLight (const v3s16 &nmin, const v3s16 &nmax) |
Spread light in the given area. | |
virtual int | getGroundLevelAtPoint (v2s16 p) |
Private Attributes | |
s16 | ground_level |
float | lake_threshold |
float | lake_steepness |
float | hill_threshold |
float | hill_steepness |
Noise * | noise_terrain |
MapgenFlat::MapgenFlat | ( | MapgenFlatParams * | params, |
EmergeParams * | emerge ) |
References MapgenBasic::cave_width, MapgenFlatParams::cave_width, MapgenBasic::cavern_limit, MapgenFlatParams::cavern_limit, MapgenBasic::cavern_taper, MapgenFlatParams::cavern_taper, MapgenBasic::cavern_threshold, MapgenFlatParams::cavern_threshold, Mapgen::csize, MapgenBasic::dungeon_ymax, MapgenFlatParams::dungeon_ymax, MapgenBasic::dungeon_ymin, MapgenFlatParams::dungeon_ymin, ground_level, MapgenFlatParams::ground_level, hill_steepness, MapgenFlatParams::hill_steepness, hill_threshold, MapgenFlatParams::hill_threshold, lake_steepness, MapgenFlatParams::lake_steepness, lake_threshold, MapgenFlatParams::lake_threshold, MapgenBasic::large_cave_depth, MapgenFlatParams::large_cave_depth, MapgenBasic::large_cave_flooded, MapgenFlatParams::large_cave_flooded, MapgenBasic::large_cave_num_max, MapgenFlatParams::large_cave_num_max, MapgenBasic::large_cave_num_min, MapgenFlatParams::large_cave_num_min, MGFLAT_HILLS, MGFLAT_LAKES, MapgenBasic::noise_filler_depth, noise_terrain, MapgenBasic::np_cave1, MapgenFlatParams::np_cave1, MapgenBasic::np_cave2, MapgenFlatParams::np_cave2, MapgenBasic::np_cavern, MapgenFlatParams::np_cavern, MapgenBasic::np_dungeons, MapgenFlatParams::np_dungeons, MapgenFlatParams::np_filler_depth, MapgenFlatParams::np_terrain, Mapgen::seed, MapgenBasic::small_cave_num_max, MapgenFlatParams::small_cave_num_max, MapgenBasic::small_cave_num_min, MapgenFlatParams::small_cave_num_min, MapgenBasic::spflags, and MapgenParams::spflags.
MapgenFlat::~MapgenFlat | ( | ) |
References MGFLAT_HILLS, MGFLAT_LAKES, MapgenBasic::noise_filler_depth, noise_terrain, and MapgenBasic::spflags.
s16 MapgenFlat::generateTerrain | ( | ) |
References VoxelArea::add_y(), MapgenBasic::c_stone, MapgenBasic::c_water_source, CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), VoxelArea::getExtent(), ground_level, hill_steepness, hill_threshold, VoxelArea::index(), lake_steepness, lake_threshold, VoxelManipulator::m_area, VoxelManipulator::m_data, MAX_MAP_GENERATION_LIMIT, MGFLAT_HILLS, MGFLAT_LAKES, MapgenBasic::node_max, MapgenBasic::node_min, noise_terrain, Noise::perlinMap2D(), Noise::result, MapgenBasic::spflags, Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
|
virtual |
Reimplemented from Mapgen.
References ground_level, hill_steepness, hill_threshold, lake_steepness, lake_threshold, MAX_MAP_GENERATION_LIMIT, MGFLAT_HILLS, MGFLAT_LAKES, MYMAX, noise_terrain, NoisePerlin2D(), Noise::np, p(), Mapgen::seed, MapgenBasic::spflags, and Mapgen::water_level.
|
inlinevirtual |
Reimplemented from Mapgen.
References MAPGEN_FLAT.
|
virtual |
Reimplemented from Mapgen.
References Mapgen::biomegen, BlockMakeData::blockpos_max, BlockMakeData::blockpos_min, Mapgen::blockseed, BiomeGen::calcBiomeNoise(), Mapgen::calcLighting(), EmergeParams::decomgr, MapgenBasic::dustTopNodes(), Mapgen::flags, MapgenBasic::full_node_max, MapgenBasic::full_node_min, MapgenBasic::generateBiomes(), MapgenBasic::generateCavernsNoise(), MapgenBasic::generateCavesNoiseIntersection(), MapgenBasic::generateCavesRandomWalk(), MapgenBasic::generateDungeons(), generateTerrain(), Mapgen::generating, Mapgen::getBlockSeed2(), MapgenBasic::large_cave_depth, Mapgen::m_emerge, MAP_BLOCKSIZE, MAX_MAP_GENERATION_LIMIT, MG_BIOMES, MG_CAVES, MG_DECORATIONS, MG_DUNGEONS, MG_LIGHT, MG_ORES, MGFLAT_CAVERNS, Mapgen::ndef, MapgenBasic::node_max, MapgenBasic::node_min, BlockMakeData::nodedef, EmergeParams::oremgr, DecorationManager::placeAllDecos(), OreManager::placeAllOres(), Mapgen::seed, MapgenBasic::spflags, BlockMakeData::transforming_liquid, Mapgen::updateHeightmap(), Mapgen::updateLiquid(), Mapgen::vm, and BlockMakeData::vmanip.
|
private |
Referenced by MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenFlat(), ~MapgenFlat(), generateTerrain(), and getSpawnLevelAtPoint().