#include <mapgen_v6.h>
Public Member Functions | |
MapgenV6 (MapgenV6Params *params, EmergeParams *emerge) | |
~MapgenV6 () | |
virtual MapgenType | getType () const |
void | makeChunk (BlockMakeData *data) |
int | getGroundLevelAtPoint (v2s16 p) |
int | getSpawnLevelAtPoint (v2s16 p) |
float | baseTerrainLevel (float terrain_base, float terrain_higher, float steepness, float height_select) |
virtual float | baseTerrainLevelFromNoise (v2s16 p) |
virtual float | baseTerrainLevelFromMap (v2s16 p) |
virtual float | baseTerrainLevelFromMap (int index) |
s16 | find_stone_level (v2s16 p2d) |
bool | block_is_underground (u64 seed, v3s16 blockpos) |
float | getHumidity (v2s16 p) |
float | getTreeAmount (v2s16 p) |
bool | getHaveAppleTree (v2s16 p) |
float | getMudAmount (int index) |
bool | getHaveBeach (int index) |
BiomeV6Type | getBiome (v2s16 p) |
BiomeV6Type | getBiome (int index, v2s16 p) |
u32 | get_blockseed (u64 seed, v3s16 p) |
virtual void | calculateNoise () |
int | generateGround () |
void | addMud () |
void | flowMud (s16 &mudflow_minpos, s16 &mudflow_maxpos) |
void | moveMud (u32 remove_index, u32 place_index, u32 above_remove_index, v2s16 pos, v3s16 em) |
void | growGrass () |
void | placeTreesAndJungleGrass () |
virtual void | generateCaves (int 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. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mapgen | |
static u32 | getBlockSeed (v3s16 p, s32 seed) |
static u32 | getBlockSeed2 (v3s16 p, s32 seed) |
static MapgenType | getMapgenType (const std::string &mgname) |
static const char * | getMapgenName (MapgenType mgtype) |
static Mapgen * | createMapgen (MapgenType mgtype, MapgenParams *params, EmergeParams *emerge) |
static MapgenParams * | createMapgenParams (MapgenType mgtype) |
static void | getMapgenNames (std::vector< const char * > *mgnames, bool include_hidden) |
static void | setDefaultSettings (Settings *settings) |
MapgenV6::MapgenV6 | ( | MapgenV6Params * | params, |
EmergeParams * | emerge ) |
References c_cobble, c_desert_sand, c_desert_stone, c_dirt, c_dirt_with_grass, c_dirt_with_snow, c_gravel, c_ice, c_lava_source, c_mossycobble, c_sand, c_snow, c_snowblock, c_stair_cobble, c_stair_desert_stone, c_stone, c_water_source, CONTENT_AIR, CONTENT_IGNORE, Mapgen::csize, dungeon_ymax, dungeon_ymin, errorstream, freq_beach, freq_desert, NodeDefManager::getId(), Mapgen::heightmap, MAP_BLOCKSIZE, EmergeParams::ndef, Mapgen::ndef, noise_beach, noise_biome, noise_height_select, noise_humidity, noise_mud, noise_steepness, noise_terrain_base, noise_terrain_higher, np_apple_trees, np_cave, np_dungeons, np_humidity, np_trees, params, Mapgen::seed, spflags, and ystride.
MapgenV6::~MapgenV6 | ( | ) |
void MapgenV6::addMud | ( | ) |
References VoxelArea::add_y(), BT_DESERT, BT_TUNDRA, c_desert_sand, c_dirt, c_gravel, c_sand, find_stone_level(), getBiome(), VoxelArea::getExtent(), getHaveBeach(), getMudAmount(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelArea::MinEdge, MYMAX, node_max, node_min, Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
float MapgenV6::baseTerrainLevel | ( | float | terrain_base, |
float | terrain_higher, | ||
float | steepness, | ||
float | height_select ) |
References rangelim.
Referenced by baseTerrainLevelFromMap(), and baseTerrainLevelFromNoise().
|
virtual |
References baseTerrainLevel(), MGV6_FLAT, noise_height_select, noise_steepness, noise_terrain_base, noise_terrain_higher, Noise::result, spflags, and Mapgen::water_level.
|
virtual |
References baseTerrainLevelFromMap(), node_min, p(), and ystride.
Referenced by baseTerrainLevelFromMap(), and generateGround().
|
virtual |
References baseTerrainLevel(), MGV6_FLAT, noise_height_select, noise_steepness, noise_terrain_base, noise_terrain_higher, NoisePerlin2D_PO(), Noise::np, p(), Mapgen::seed, spflags, and Mapgen::water_level.
Referenced by getGroundLevelAtPoint(), and getSpawnLevelAtPoint().
bool MapgenV6::block_is_underground | ( | u64 | seed, |
v3s16 | blockpos ) |
References MAP_BLOCKSIZE, and Mapgen::water_level.
|
virtual |
References full_node_min, MGV6_FLAT, node_min, noise_beach, noise_biome, noise_height_select, noise_humidity, noise_mud, noise_steepness, noise_terrain_base, noise_terrain_higher, Noise::perlinMap2D_PO(), and spflags.
Referenced by makeChunk().
s16 MapgenV6::find_stone_level | ( | v2s16 | p2d | ) |
References VoxelArea::add_y(), c_desert_stone, c_stone, CONTENT_IGNORE, MapNode::getContent(), VoxelArea::getExtent(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, VoxelArea::MaxEdge, VoxelArea::MinEdge, and Mapgen::vm.
Referenced by addMud().
void MapgenV6::flowMud | ( | s16 & | mudflow_minpos, |
s16 & | mudflow_maxpos ) |
References VoxelArea::add_p(), VoxelArea::add_y(), c_dirt, c_dirt_with_grass, c_gravel, CONTENT_IGNORE, NodeDefManager::get(), MapNode::getContent(), VoxelArea::getExtent(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, moveMud(), Mapgen::ndef, node_max, node_min, MapNode::setContent(), Mapgen::vm, and ContentFeatures::walkable.
Referenced by makeChunk().
|
virtual |
References Mapgen::blockseed, BT_DESERT, c_lava_source, c_water_source, Mapgen::gennotify, getBiome(), Mapgen::heightmap, CavesV6::makeCave(), MAP_BLOCKSIZE, MYMAX, Mapgen::ndef, node_max, node_min, NoisePerlin2D(), np_cave, PseudoRandom::range(), Mapgen::seed, Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
int MapgenV6::generateGround | ( | ) |
References VoxelArea::add_y(), baseTerrainLevelFromMap(), BT_DESERT, BT_TUNDRA, c_desert_stone, c_ice, c_stone, c_water_source, CONTENT_AIR, CONTENT_IGNORE, getBiome(), MapNode::getContent(), VoxelArea::getExtent(), VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, MAX_MAP_GENERATION_LIMIT, MGV6_DESERT_STONE_BASE, MGV6_ICE_BASE, node_max, node_min, Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
u32 MapgenV6::get_blockseed | ( | u64 | seed, |
v3s16 | p ) |
References p(), and Mapgen::seed.
Referenced by makeChunk().
BiomeV6Type MapgenV6::getBiome | ( | int | index, |
v2s16 | p ) |
References blend, BT_DESERT, BT_JUNGLE, BT_NORMAL, BT_TAIGA, BT_TUNDRA, freq_desert, MGV6_BIOMEBLEND, MGV6_FREQ_HOT, MGV6_FREQ_JUNGLE, MGV6_FREQ_SNOW, MGV6_FREQ_TAIGA, MGV6_JUNGLES, MGV6_SNOWBIOMES, noise2d(), noise_biome, noise_humidity, p(), Noise::result, Mapgen::seed, and spflags.
BiomeV6Type MapgenV6::getBiome | ( | v2s16 | p | ) |
References full_node_min, getBiome(), MAP_BLOCKSIZE, p(), and ystride.
Referenced by addMud(), generateCaves(), generateGround(), getBiome(), growGrass(), makeChunk(), and placeTreesAndJungleGrass().
|
virtual |
Reimplemented from Mapgen.
References baseTerrainLevelFromNoise(), MGV6_AVERAGE_MUD_AMOUNT, and p().
bool MapgenV6::getHaveAppleTree | ( | v2s16 | p | ) |
References NoisePerlin2D(), np_apple_trees, p(), and Mapgen::seed.
Referenced by placeTreesAndJungleGrass().
bool MapgenV6::getHaveBeach | ( | int | index | ) |
References freq_beach, noise_beach, and Noise::result.
Referenced by addMud().
float MapgenV6::getHumidity | ( | v2s16 | p | ) |
References full_node_min, MAP_BLOCKSIZE, noise_humidity, p(), Noise::result, and ystride.
Referenced by placeTreesAndJungleGrass().
float MapgenV6::getMudAmount | ( | int | index | ) |
References MGV6_AVERAGE_MUD_AMOUNT, MGV6_FLAT, noise_mud, Noise::result, and spflags.
Referenced by addMud().
|
virtual |
Reimplemented from Mapgen.
References baseTerrainLevelFromNoise(), MAX_MAP_GENERATION_LIMIT, MGV6_AVERAGE_MUD_AMOUNT, p(), and Mapgen::water_level.
float MapgenV6::getTreeAmount | ( | v2s16 | p | ) |
References NoisePerlin2D(), np_trees, p(), and Mapgen::seed.
Referenced by placeTreesAndJungleGrass().
|
inlinevirtual |
void MapgenV6::growGrass | ( | ) |
References VoxelArea::add_y(), BT_TAIGA, BT_TUNDRA, c_dirt, c_dirt_with_grass, c_dirt_with_snow, c_ice, c_snowblock, c_stone, CPT_LIGHT, full_node_max, full_node_min, NodeDefManager::get(), getBiome(), MapNode::getContent(), VoxelArea::getExtent(), VoxelArea::index(), LIQUID_NONE, ContentFeatures::liquid_type, VoxelManipulator::m_area, VoxelManipulator::m_data, Mapgen::ndef, node_max, ContentFeatures::param_type, Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
|
virtual |
Reimplemented from Mapgen.
References addMud(), BlockMakeData::blockpos_max, BlockMakeData::blockpos_min, Mapgen::blockseed, BT_DESERT, DungeonParams::c_alt_wall, c_cobble, c_desert_stone, c_mossycobble, DungeonParams::c_stair, c_stair_cobble, c_stair_desert_stone, DungeonParams::c_wall, Mapgen::calcLighting(), calculateNoise(), central_area_size, CONTENT_IGNORE, DungeonParams::corridor_len_max, DungeonParams::corridor_len_min, EmergeParams::decomgr, DungeonParams::diagonal_dirs, dungeon_ymax, dungeon_ymin, Mapgen::flags, flowMud(), full_node_max, full_node_min, DungeonGen::generate(), generateCaves(), generateGround(), Mapgen::generating, Mapgen::gennotify, GENNOTIFY_DUNGEON, GENNOTIFY_TEMPLE, get_blockseed(), getBiome(), growGrass(), DungeonParams::holesize, DungeonParams::large_room_chance, Mapgen::m_emerge, MAP_BLOCKSIZE, MG_CAVES, MG_DECORATIONS, MG_DUNGEONS, MG_LIGHT, MG_ORES, MGV6_MUDFLOW, MGV6_TEMPLES, MGV6_TREES, Mapgen::ndef, node_max, node_min, BlockMakeData::nodedef, NoisePerlin3D(), DungeonParams::notifytype, DungeonParams::np_alt_wall, np_dungeons, DungeonParams::num_dungeons, DungeonParams::num_rooms, DungeonParams::only_in_ground, EmergeParams::oremgr, DecorationManager::placeAllDecos(), OreManager::placeAllOres(), placeTreesAndJungleGrass(), PseudoRandom::range(), DungeonParams::room_size_large_max, DungeonParams::room_size_large_min, DungeonParams::room_size_max, DungeonParams::room_size_min, BlockMakeData::seed, DungeonParams::seed, Mapgen::seed, spflags, BlockMakeData::transforming_liquid, Mapgen::updateHeightmap(), Mapgen::updateLiquid(), Mapgen::vm, and BlockMakeData::vmanip.
void MapgenV6::moveMud | ( | u32 | remove_index, |
u32 | place_index, | ||
u32 | above_remove_index, | ||
v2s16 | pos, | ||
v3s16 | em ) |
References VoxelArea::add_y(), c_water_source, VoxelArea::contains(), CONTENT_AIR, CONTENT_IGNORE, MapNode::getContent(), VoxelManipulator::m_area, VoxelManipulator::m_data, node_max, node_min, and Mapgen::vm.
Referenced by flowMud().
void MapgenV6::placeTreesAndJungleGrass | ( | ) |
References VoxelArea::add_y(), Mapgen::blockseed, BT_JUNGLE, BT_NORMAL, BT_TAIGA, c_dirt, c_dirt_with_grass, c_dirt_with_snow, central_area_size, CONTENT_AIR, CONTENT_IGNORE, getBiome(), MapNode::getContent(), VoxelArea::getExtent(), getHaveAppleTree(), getHumidity(), NodeDefManager::getId(), getTreeAmount(), Mapgen::heightmap, VoxelArea::index(), VoxelManipulator::m_area, VoxelManipulator::m_data, treegen::make_jungletree(), treegen::make_pine_tree(), treegen::make_tree(), myrand(), myrand_range(), Mapgen::ndef, node_max, node_min, p(), PseudoRandom::range(), Mapgen::vm, and Mapgen::water_level.
Referenced by makeChunk().
content_t MapgenV6::c_cobble |
Referenced by MapgenV6(), and makeChunk().
content_t MapgenV6::c_desert_sand |
Referenced by MapgenV6(), and addMud().
content_t MapgenV6::c_desert_stone |
Referenced by MapgenV6(), find_stone_level(), generateGround(), and makeChunk().
content_t MapgenV6::c_dirt |
Referenced by MapgenV6(), addMud(), flowMud(), growGrass(), and placeTreesAndJungleGrass().
content_t MapgenV6::c_dirt_with_grass |
Referenced by MapgenV6(), flowMud(), growGrass(), and placeTreesAndJungleGrass().
content_t MapgenV6::c_dirt_with_snow |
Referenced by MapgenV6(), growGrass(), and placeTreesAndJungleGrass().
content_t MapgenV6::c_gravel |
Referenced by MapgenV6(), addMud(), and flowMud().
content_t MapgenV6::c_ice |
Referenced by MapgenV6(), generateGround(), and growGrass().
content_t MapgenV6::c_lava_source |
Referenced by MapgenV6(), and generateCaves().
content_t MapgenV6::c_mossycobble |
Referenced by MapgenV6(), and makeChunk().
content_t MapgenV6::c_sand |
Referenced by MapgenV6(), and addMud().
content_t MapgenV6::c_snow |
Referenced by MapgenV6().
content_t MapgenV6::c_snowblock |
Referenced by MapgenV6(), and growGrass().
content_t MapgenV6::c_stair_cobble |
Referenced by MapgenV6(), and makeChunk().
content_t MapgenV6::c_stair_desert_stone |
Referenced by MapgenV6(), and makeChunk().
content_t MapgenV6::c_stone |
Referenced by MapgenV6(), find_stone_level(), generateGround(), and growGrass().
content_t MapgenV6::c_water_source |
Referenced by MapgenV6(), generateCaves(), generateGround(), and moveMud().
v3s16 MapgenV6::central_area_size |
Referenced by makeChunk(), and placeTreesAndJungleGrass().
s16 MapgenV6::dungeon_ymax |
Referenced by MapgenV6(), and makeChunk().
s16 MapgenV6::dungeon_ymin |
Referenced by MapgenV6(), and makeChunk().
float MapgenV6::freq_beach |
Referenced by MapgenV6(), and getHaveBeach().
float MapgenV6::freq_desert |
Referenced by MapgenV6(), and getBiome().
v3s16 MapgenV6::full_node_max |
Referenced by growGrass(), and makeChunk().
v3s16 MapgenV6::full_node_min |
Referenced by calculateNoise(), getBiome(), getHumidity(), growGrass(), and makeChunk().
v3s16 MapgenV6::node_max |
Referenced by addMud(), flowMud(), generateCaves(), generateGround(), growGrass(), makeChunk(), moveMud(), and placeTreesAndJungleGrass().
v3s16 MapgenV6::node_min |
Referenced by addMud(), baseTerrainLevelFromMap(), calculateNoise(), flowMud(), generateCaves(), generateGround(), makeChunk(), moveMud(), and placeTreesAndJungleGrass().
Noise* MapgenV6::noise_beach |
Referenced by MapgenV6(), ~MapgenV6(), calculateNoise(), and getHaveBeach().
Noise* MapgenV6::noise_biome |
Referenced by MapgenV6(), ~MapgenV6(), calculateNoise(), and getBiome().
Noise* MapgenV6::noise_height_select |
Referenced by MapgenV6(), ~MapgenV6(), baseTerrainLevelFromMap(), baseTerrainLevelFromNoise(), and calculateNoise().
Noise* MapgenV6::noise_humidity |
Referenced by MapgenV6(), ~MapgenV6(), calculateNoise(), getBiome(), and getHumidity().
Noise* MapgenV6::noise_mud |
Referenced by MapgenV6(), ~MapgenV6(), calculateNoise(), and getMudAmount().
Noise* MapgenV6::noise_steepness |
Referenced by MapgenV6(), ~MapgenV6(), baseTerrainLevelFromMap(), baseTerrainLevelFromNoise(), and calculateNoise().
Noise* MapgenV6::noise_terrain_base |
Referenced by MapgenV6(), ~MapgenV6(), baseTerrainLevelFromMap(), baseTerrainLevelFromNoise(), and calculateNoise().
Noise* MapgenV6::noise_terrain_higher |
Referenced by MapgenV6(), ~MapgenV6(), baseTerrainLevelFromMap(), baseTerrainLevelFromNoise(), and calculateNoise().
NoiseParams* MapgenV6::np_apple_trees |
Referenced by MapgenV6(), and getHaveAppleTree().
NoiseParams* MapgenV6::np_cave |
Referenced by MapgenV6(), and generateCaves().
NoiseParams MapgenV6::np_dungeons |
Referenced by MapgenV6(), and makeChunk().
NoiseParams* MapgenV6::np_humidity |
Referenced by MapgenV6().
NoiseParams* MapgenV6::np_trees |
Referenced by MapgenV6(), and getTreeAmount().
u32 MapgenV6::spflags |
Referenced by MapgenV6(), baseTerrainLevelFromMap(), baseTerrainLevelFromNoise(), calculateNoise(), getBiome(), getMudAmount(), and makeChunk().
int MapgenV6::ystride |
Referenced by MapgenV6(), baseTerrainLevelFromMap(), getBiome(), and getHumidity().