15#define MAPGEN_DEFAULT MAPGEN_V7
16#define MAPGEN_DEFAULT_NAME "v7"
20#define MG_DUNGEONS 0x04
22#define MG_DECORATIONS 0x20
80 const std::set<std::string> *notify_on_custom);
84 bool setCustom(
const std::string &key,
const std::string &value);
85 void getEvents(std::map<std::string, std::vector<v3s16>> &map)
const;
191 std::vector<s16> &floors, std::vector<s16> &ceilings);
211 bool propagate_shadow =
true);
245 static void getMapgenNames(std::vector<const char *> *mgnames,
bool include_hidden);
259 const v3s16 &
p, u8 light);
Definition mg_biome.h:203
StringMap m_notify_custom
Definition mapgen.h:94
bool addEvent(GenNotifyType type, v3s16 pos)
Definition mapgen.cpp:967
GenerateNotifier()=default
void clearEvents()
Definition mapgen.cpp:1028
const StringMap & getCustomData() const
Definition mapgen.h:86
void getEvents(std::map< std::string, std::vector< v3s16 > > &map) const
Definition mapgen.cpp:1013
bool shouldNotifyOn(GenNotifyType type) const
Definition mapgen.h:96
std::list< GenNotifyEvent > m_notify_events
Definition mapgen.h:93
const std::set< std::string > * m_notify_on_custom
Definition mapgen.h:92
bool addDecorationEvent(v3s16 pos, u32 deco_id)
Definition mapgen.cpp:981
bool setCustom(const std::string &key, const std::string &value)
Definition mapgen.cpp:999
const std::set< u32 > * m_notify_on_deco_ids
Definition mapgen.h:91
u32 m_notify_on
Definition mapgen.h:90
MapgenBasic(int mapgenid, MapgenParams *params, EmergeParams *emerge)
Definition mapgen.cpp:567
int zstride_1u1d
Definition mapgen.h:312
float cavern_limit
Definition mapgen.h:321
content_t c_lava_source
Definition mapgen.h:306
float cavern_taper
Definition mapgen.h:322
int zstride_1d
Definition mapgen.h:311
content_t c_stone
Definition mapgen.h:303
virtual void dustTopNodes()
Definition mapgen.cpp:766
Noise * noise_filler_depth
Definition mapgen.h:296
virtual bool generateCavernsNoise(s16 max_stone_y)
Definition mapgen.cpp:875
content_t c_water_source
Definition mapgen.h:304
virtual void generateDungeons(s16 max_stone_y)
Definition mapgen.cpp:887
v3s16 full_node_min
Definition mapgen.h:300
NoiseParams np_cave1
Definition mapgen.h:316
int ystride
Definition mapgen.h:309
int zstride
Definition mapgen.h:310
NoiseParams np_dungeons
Definition mapgen.h:319
int large_cave_num_min
Definition mapgen.h:326
virtual void generateCavesRandomWalk(s16 max_stone_y, s16 large_cave_ymax)
Definition mapgen.cpp:844
s16 dungeon_ymin
Definition mapgen.h:330
u32 spflags
Definition mapgen.h:314
s16 dungeon_ymax
Definition mapgen.h:331
virtual ~MapgenBasic()
Definition mapgen.cpp:620
content_t c_river_water_source
Definition mapgen.h:305
v3s16 node_min
Definition mapgen.h:298
int large_cave_num_max
Definition mapgen.h:327
BiomeManager * m_bmgr
Definition mapgen.h:294
int small_cave_num_min
Definition mapgen.h:324
float cave_width
Definition mapgen.h:320
v3s16 full_node_max
Definition mapgen.h:301
int small_cave_num_max
Definition mapgen.h:325
v3s16 node_max
Definition mapgen.h:299
float large_cave_flooded
Definition mapgen.h:328
virtual void generateCavesNoiseIntersection(s16 max_stone_y)
Definition mapgen.cpp:830
float cavern_threshold
Definition mapgen.h:323
NoiseParams np_cave2
Definition mapgen.h:317
content_t c_cobble
Definition mapgen.h:307
s16 large_cave_depth
Definition mapgen.h:329
NoiseParams np_cavern
Definition mapgen.h:318
virtual void generateBiomes()
Definition mapgen.cpp:626
s16 findGroundLevel(v2s16 p2d, s16 ymin, s16 ymax)
Definition mapgen.cpp:241
void getSurfaces(v2s16 p2d, s16 ymin, s16 ymax, std::vector< s16 > &floors, std::vector< s16 > &ceilings)
Definition mapgen.cpp:296
virtual MapgenType getType() const
Definition mapgen.h:183
void updateHeightmap(v3s16 nmin, v3s16 nmax)
Definition mapgen.cpp:279
s16 findLiquidSurface(v2s16 p2d, s16 ymin, s16 ymax)
Definition mapgen.cpp:259
void lightSpread(VoxelArea &a, std::queue< std::pair< v3s16, u8 > > &queue, const v3s16 &p, u8 light)
Spread light to the node at the given position, add to queue if changed.
Definition mapgen.cpp:432
GenerateNotifier gennotify
Definition mapgen.h:176
s16 * heightmap
Definition mapgen.h:171
EmergeParams * m_emerge
Definition mapgen.h:166
s32 seed
Definition mapgen.h:156
virtual int getGroundLevelAtPoint(v2s16 p)
Definition mapgen.h:230
virtual int getSpawnLevelAtPoint(v2s16 p)
Definition mapgen.h:237
virtual void makeChunk(BlockMakeData *data)
Definition mapgen.h:229
MMVManip * vm
Definition mapgen.h:163
u32 flags
Definition mapgen.h:159
int water_level
Definition mapgen.h:157
void calcLighting(v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax, bool propagate_shadow=true)
Run all lighting calculations.
Definition mapgen.cpp:469
static MapgenType getMapgenType(const std::string &mgname)
Definition mapgen.cpp:130
static u32 getBlockSeed(v3s16 p, s32 seed)
Definition mapgen.cpp:222
DISABLE_CLASS_COPY(Mapgen)
virtual ~Mapgen()
Definition mapgen.cpp:124
int mapgen_limit
Definition mapgen.h:158
static void setDefaultSettings(Settings *settings)
Definition mapgen.cpp:210
static Mapgen * createMapgen(MapgenType mgtype, MapgenParams *params, EmergeParams *emerge)
Definition mapgen.cpp:151
void setLighting(u8 light, v3s16 nmin, v3s16 nmax)
Set light in entire area to fixed value.
Definition mapgen.cpp:417
static u32 getBlockSeed2(v3s16 p, s32 seed)
Definition mapgen.cpp:231
static void getMapgenNames(std::vector< const char * > *mgnames, bool include_hidden)
Definition mapgen.cpp:202
biome_t * biomemap
Definition mapgen.h:172
bool isLiquidHorizontallyFlowable(u32 vi, v3s16 em)
Definition mapgen.cpp:323
static const char * getMapgenName(MapgenType mgtype)
Definition mapgen.cpp:141
const NodeDefManager * ndef
Definition mapgen.h:167
void spreadLight(const v3s16 &nmin, const v3s16 &nmax)
Spread light in the given area.
Definition mapgen.cpp:515
static MapgenParams * createMapgenParams(MapgenType mgtype)
Definition mapgen.cpp:177
u32 blockseed
Definition mapgen.h:170
void propagateSunlight(v3s16 nmin, v3s16 nmax, bool propagate_shadow)
Spread sunlight from the area above downwards.
Definition mapgen.cpp:479
BiomeGen * biomegen
Definition mapgen.h:175
bool generating
Definition mapgen.h:160
void updateLiquid(UniqueQueue< v3s16 > *trans_liquid, v3s16 nmin, v3s16 nmax)
Definition mapgen.cpp:356
v3s16 csize
Definition mapgen.h:173
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:540
Definition settings.h:109
Definition container.h:26
#define MAX_MAP_GENERATION_LIMIT
Definition constants.h:54
static const char * settings[]
Definition fontengine.cpp:27
core::vector2d< s16 > v2s16
Definition irr_v2d.h:12
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
GenNotifyType
Definition mapgen.h:56
@ GENNOTIFY_CUSTOM
Definition mapgen.h:64
@ GENNOTIFY_LARGECAVE_END
Definition mapgen.h:62
@ GENNOTIFY_DECORATION
Definition mapgen.h:63
@ GENNOTIFY_LARGECAVE_BEGIN
Definition mapgen.h:61
@ GENNOTIFY_CAVE_END
Definition mapgen.h:60
@ NUM_GENNOTIFY_TYPES
Definition mapgen.h:65
@ GENNOTIFY_TEMPLE
Definition mapgen.h:58
@ GENNOTIFY_DUNGEON
Definition mapgen.h:57
@ GENNOTIFY_CAVE_BEGIN
Definition mapgen.h:59
MapgenType
Definition mapgen.h:102
@ MAPGEN_V6
Definition mapgen.h:110
@ MAPGEN_INVALID
Definition mapgen.h:111
@ MAPGEN_FLAT
Definition mapgen.h:107
@ MAPGEN_V5
Definition mapgen.h:106
@ MAPGEN_CARPATHIAN
Definition mapgen.h:105
@ MAPGEN_SINGLENODE
Definition mapgen.h:109
@ MAPGEN_V7
Definition mapgen.h:103
@ MAPGEN_VALLEYS
Definition mapgen.h:104
@ MAPGEN_FRACTAL
Definition mapgen.h:108
FlagDesc flagdesc_mapgen[]
Definition mapgen.cpp:40
std::pair< s16, s16 > get_mapgen_edges(s16 mapgen_limit, s16 chunksize)
Definition mapgen.cpp:1109
MapgenObject
Definition mapgen.h:47
@ MGOBJ_HEATMAP
Definition mapgen.h:51
@ MGOBJ_HUMIDMAP
Definition mapgen.h:52
@ MGOBJ_GENNOTIFY
Definition mapgen.h:53
@ MGOBJ_VMANIP
Definition mapgen.h:48
@ MGOBJ_HEIGHTMAP
Definition mapgen.h:49
@ MGOBJ_BIOMEMAP
Definition mapgen.h:50
u16 biome_t
Definition mapgen.h:26
#define MAPGEN_DEFAULT
Definition mapgen.h:15
FlagDesc flagdesc_gennotify[]
Definition mapgen.cpp:50
u16 content_t
Definition mapnode.h:22
std::unordered_map< std::string, std::string > StringMap
Definition string.h:65
GenNotifyType type
Definition mapgen.h:71
u32 id
Definition mapgen.h:73
v3s16 pos
Definition mapgen.h:72
virtual ~MapgenParams()
Definition mapgen.cpp:1040
BiomeParams * bparams
Definition mapgen.h:127
virtual void setDefaultSettings(Settings *settings)
Definition mapgen.h:135
u32 flags
Definition mapgen.h:124
s16 mapgen_edge_max
Definition mapgen.h:130
u64 seed
Definition mapgen.h:120
s16 mapgen_edge_min
Definition mapgen.h:129
s16 water_level
Definition mapgen.h:121
virtual void writeParams(Settings *settings) const
Definition mapgen.cpp:1082
s16 mapgen_limit
Definition mapgen.h:122
MapgenType mgtype
Definition mapgen.h:118
virtual void readParams(const Settings *settings)
Definition mapgen.cpp:1046
bool m_mapgen_edges_calculated
Definition mapgen.h:140
s32 getSpawnRangeMax()
Definition mapgen.cpp:1096
s16 chunksize
Definition mapgen.h:119
u32 spflags
Definition mapgen.h:125
static std::string p(std::string path)
Definition test_filesys.cpp:53