#include <mapgen_v7.h>
Public Member Functions | |
MapgenV7 (MapgenV7Params *params, EmergeParams *emerge) | |
~MapgenV7 () | |
virtual MapgenType | getType () const |
virtual void | makeChunk (BlockMakeData *data) |
int | getSpawnLevelAtPoint (v2s16 p) |
float | baseTerrainLevelAtPoint (s16 x, s16 z) |
float | baseTerrainLevelFromMap (int index) |
bool | getMountainTerrainAtPoint (s16 x, s16 y, s16 z) |
bool | getMountainTerrainFromMap (int idx_xyz, int idx_xz, s16 y) |
bool | getRiverChannelFromMap (int idx_xyz, int idx_xz, s16 y) |
bool | getFloatlandTerrainFromMap (int idx_xyz, float float_offset) |
int | 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 | mount_zero_level |
s16 | floatland_ymin |
s16 | floatland_ymax |
s16 | floatland_taper |
float | float_taper_exp |
float | floatland_density |
s16 | floatland_ywater |
float * | float_offset_cache = nullptr |
Noise * | noise_terrain_base |
Noise * | noise_terrain_alt |
Noise * | noise_terrain_persist |
Noise * | noise_height_select |
Noise * | noise_mount_height |
Noise * | noise_ridge_uwater |
Noise * | noise_mountain |
Noise * | noise_ridge |
Noise * | noise_floatland |
MapgenV7::MapgenV7 | ( | MapgenV7Params * | params, |
EmergeParams * | emerge ) |
References MapgenBasic::cave_width, MapgenV7Params::cave_width, MapgenBasic::cavern_limit, MapgenV7Params::cavern_limit, MapgenBasic::cavern_taper, MapgenV7Params::cavern_taper, MapgenBasic::cavern_threshold, MapgenV7Params::cavern_threshold, Mapgen::csize, MapgenBasic::dungeon_ymax, MapgenV7Params::dungeon_ymax, MapgenBasic::dungeon_ymin, MapgenV7Params::dungeon_ymin, float_offset_cache, float_taper_exp, MapgenV7Params::float_taper_exp, floatland_density, MapgenV7Params::floatland_density, floatland_taper, MapgenV7Params::floatland_taper, floatland_ymax, MapgenV7Params::floatland_ymax, floatland_ymin, MapgenV7Params::floatland_ymin, floatland_ywater, MapgenV7Params::floatland_ywater, MapgenBasic::large_cave_depth, MapgenV7Params::large_cave_depth, MapgenBasic::large_cave_flooded, MapgenV7Params::large_cave_flooded, MapgenBasic::large_cave_num_max, MapgenV7Params::large_cave_num_max, MapgenBasic::large_cave_num_min, MapgenV7Params::large_cave_num_min, MGV7_FLOATLANDS, MGV7_MOUNTAINS, MGV7_RIDGES, mount_zero_level, MapgenV7Params::mount_zero_level, MapgenBasic::noise_filler_depth, noise_floatland, noise_height_select, noise_mount_height, noise_mountain, noise_ridge, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, MapgenBasic::np_cave1, MapgenV7Params::np_cave1, MapgenBasic::np_cave2, MapgenV7Params::np_cave2, MapgenBasic::np_cavern, MapgenV7Params::np_cavern, MapgenBasic::np_dungeons, MapgenV7Params::np_dungeons, MapgenV7Params::np_filler_depth, MapgenV7Params::np_floatland, MapgenV7Params::np_height_select, MapgenV7Params::np_mount_height, MapgenV7Params::np_mountain, MapgenV7Params::np_ridge, MapgenV7Params::np_ridge_uwater, MapgenV7Params::np_terrain_alt, MapgenV7Params::np_terrain_base, MapgenV7Params::np_terrain_persist, Mapgen::seed, MapgenBasic::small_cave_num_max, MapgenV7Params::small_cave_num_max, MapgenBasic::small_cave_num_min, MapgenV7Params::small_cave_num_min, MapgenBasic::spflags, and MapgenParams::spflags.
MapgenV7::~MapgenV7 | ( | ) |
References float_offset_cache, MGV7_FLOATLANDS, MGV7_MOUNTAINS, MGV7_RIDGES, MapgenBasic::noise_filler_depth, noise_floatland, noise_height_select, noise_mount_height, noise_mountain, noise_ridge, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, and MapgenBasic::spflags.
float MapgenV7::baseTerrainLevelAtPoint | ( | s16 | x, |
s16 | z ) |
References noise_height_select, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, NoisePerlin2D(), Noise::np, NoiseParams::persist, rangelim, and Mapgen::seed.
Referenced by getSpawnLevelAtPoint().
float MapgenV7::baseTerrainLevelFromMap | ( | int | index | ) |
References noise_height_select, noise_terrain_alt, noise_terrain_base, rangelim, and Noise::result.
Referenced by generateTerrain().
int MapgenV7::generateTerrain | ( | ) |
References VoxelArea::add_y(), baseTerrainLevelFromMap(), MapgenBasic::c_stone, MapgenBasic::c_water_source, CONTENT_AIR, CONTENT_IGNORE, float_offset_cache, float_taper_exp, floatland_taper, floatland_ymax, floatland_ymin, floatland_ywater, MapNode::getContent(), VoxelArea::getExtent(), getFloatlandTerrainFromMap(), getMountainTerrainFromMap(), getRiverChannelFromMap(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, MAX_MAP_GENERATION_LIMIT, MGV7_FLOATLANDS, MGV7_MOUNTAINS, MGV7_RIDGES, MapgenBasic::node_max, MapgenBasic::node_min, noise_floatland, noise_height_select, noise_mount_height, noise_mountain, noise_ridge, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, noise_terrain_persist, Noise::perlinMap2D(), Noise::perlinMap3D(), Noise::result, MapgenBasic::spflags, Mapgen::vm, Mapgen::water_level, MapgenBasic::ystride, and MapgenBasic::zstride_1u1d.
Referenced by makeChunk().
bool MapgenV7::getFloatlandTerrainFromMap | ( | int | idx_xyz, |
float | float_offset ) |
References floatland_density, noise_floatland, and Noise::result.
Referenced by generateTerrain().
bool MapgenV7::getMountainTerrainAtPoint | ( | s16 | x, |
s16 | y, | ||
s16 | z ) |
References mount_zero_level, noise_mount_height, noise_mountain, NoisePerlin2D(), NoisePerlin3D(), Noise::np, and Mapgen::seed.
Referenced by getSpawnLevelAtPoint().
bool MapgenV7::getMountainTerrainFromMap | ( | int | idx_xyz, |
int | idx_xz, | ||
s16 | y ) |
References mount_zero_level, noise_mount_height, noise_mountain, and Noise::result.
Referenced by generateTerrain().
bool MapgenV7::getRiverChannelFromMap | ( | int | idx_xyz, |
int | idx_xz, | ||
s16 | y ) |
References noise_ridge, noise_ridge_uwater, Noise::result, and Mapgen::water_level.
Referenced by generateTerrain().
|
virtual |
Reimplemented from Mapgen.
References baseTerrainLevelAtPoint(), getMountainTerrainAtPoint(), MAX_MAP_GENERATION_LIMIT, MGV7_MOUNTAINS, MGV7_RIDGES, noise_ridge_uwater, noise_terrain_alt, noise_terrain_base, NoisePerlin2D(), Noise::np, NoiseParams::offset, p(), Mapgen::seed, MapgenBasic::spflags, and Mapgen::water_level.
|
inlinevirtual |
|
virtual |
Reimplemented from Mapgen.
References Mapgen::biomegen, BlockMakeData::blockpos_max, BlockMakeData::blockpos_min, Mapgen::blockseed, BiomeGen::calcBiomeNoise(), Mapgen::calcLighting(), Mapgen::csize, EmergeParams::decomgr, MapgenBasic::dustTopNodes(), Mapgen::flags, floatland_ymax, floatland_ymin, 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, MGV7_CAVERNS, MGV7_FLOATLANDS, 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 MapgenV7(), ~MapgenV7(), and generateTerrain().
|
private |
Referenced by MapgenV7(), and generateTerrain().
|
private |
Referenced by MapgenV7(), and getFloatlandTerrainFromMap().
|
private |
Referenced by MapgenV7(), and generateTerrain().
|
private |
Referenced by MapgenV7(), generateTerrain(), and makeChunk().
|
private |
Referenced by MapgenV7(), generateTerrain(), and makeChunk().
|
private |
Referenced by MapgenV7(), and generateTerrain().
|
private |
Referenced by MapgenV7(), getMountainTerrainAtPoint(), and getMountainTerrainFromMap().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), generateTerrain(), and getFloatlandTerrainFromMap().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), baseTerrainLevelAtPoint(), baseTerrainLevelFromMap(), and generateTerrain().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), generateTerrain(), getMountainTerrainAtPoint(), and getMountainTerrainFromMap().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), generateTerrain(), getMountainTerrainAtPoint(), and getMountainTerrainFromMap().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), generateTerrain(), and getRiverChannelFromMap().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), generateTerrain(), getRiverChannelFromMap(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), baseTerrainLevelAtPoint(), baseTerrainLevelFromMap(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), baseTerrainLevelAtPoint(), baseTerrainLevelFromMap(), generateTerrain(), and getSpawnLevelAtPoint().
|
private |
Referenced by MapgenV7(), ~MapgenV7(), baseTerrainLevelAtPoint(), and generateTerrain().