Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
Ore Class Referenceabstract

#include <mg_ore.h>

+ Inheritance diagram for Ore:
+ Collaboration diagram for Ore:

Public Member Functions

 Ore (bool needs_noise)
 
virtual ~Ore ()
 
virtual void resolveNodeNames ()
 
size_t placeOre (Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
 
virtual void generate (MMVManip *vm, int mapseed, u32 blockseed, v3s16 nmin, v3s16 nmax, biome_t *biomemap)=0
 
- Public Member Functions inherited from ObjDef
virtual ~ObjDef ()=default
 
virtual ObjDefclone () const =0
 
- Public Member Functions inherited from NodeResolver
 NodeResolver ()
 
virtual ~NodeResolver ()
 
void cloneTo (NodeResolver *res) const
 
bool getIdFromNrBacklog (content_t *result_out, const std::string &node_alt, content_t c_fallback, bool error_on_fallback=true)
 
bool getIdsFromNrBacklog (std::vector< content_t > *result_out, bool all_required=false, content_t c_fallback=CONTENT_IGNORE)
 
bool isResolveDone () const
 
void reset (bool resolve_done=false)
 

Public Attributes

const bool needs_noise
 
content_t c_ore
 
std::vector< content_tc_wherein
 
u32 clust_scarcity
 
s16 clust_num_ores
 
s16 clust_size
 
s16 y_min
 
s16 y_max
 
u8 ore_param2
 
u32 flags = 0
 
float nthresh
 
NoiseParams np
 
Noisenoise = nullptr
 
std::unordered_set< biome_tbiomes
 
- Public Attributes inherited from ObjDef
u32 index
 
u32 uid
 
ObjDefHandle handle
 
std::string name
 
- Public Attributes inherited from NodeResolver
std::vector< std::string > m_nodenames
 
std::vector< size_t > m_nnlistsizes
 

Protected Member Functions

void cloneTo (Ore *def) const
 
- Protected Member Functions inherited from ObjDef
void cloneTo (ObjDef *def) const
 

Additional Inherited Members

- Protected Attributes inherited from NodeResolver
const NodeDefManagerm_ndef = nullptr
 
u32 m_nodenames_idx = 0
 

Constructor & Destructor Documentation

◆ Ore()

Ore::Ore ( bool needs_noise)
inlineexplicit

◆ ~Ore()

Ore::~Ore ( )
virtual

References noise.

Member Function Documentation

◆ cloneTo()

void Ore::cloneTo ( Ore * def) const
protected

References biomes, c_ore, c_wherein, NodeResolver::cloneTo(), ObjDef::cloneTo(), clust_num_ores, clust_scarcity, clust_size, flags, noise, np, nthresh, ore_param2, y_max, and y_min.

Referenced by OreBlob::clone(), OrePuff::clone(), OreScatter::clone(), OreSheet::clone(), OreStratum::clone(), and OreVein::clone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generate()

virtual void Ore::generate ( MMVManip * vm,
int mapseed,
u32 blockseed,
v3s16 nmin,
v3s16 nmax,
biome_t * biomemap )
pure virtual

Implemented in OreBlob, OrePuff, OreScatter, OreSheet, OreStratum, and OreVein.

Referenced by placeOre().

+ Here is the caller graph for this function:

◆ placeOre()

size_t Ore::placeOre ( Mapgen * mg,
u32 blockseed,
v3s16 nmin,
v3s16 nmax )

References Mapgen::biomemap, clust_size, generate(), MYMAX, MYMIN, Mapgen::seed, Mapgen::vm, y_max, and y_min.

Referenced by OreManager::placeAllOres().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveNodeNames()

void Ore::resolveNodeNames ( )
virtual

Implements NodeResolver.

References c_ore, c_wherein, CONTENT_AIR, NodeResolver::getIdFromNrBacklog(), and NodeResolver::getIdsFromNrBacklog().

+ Here is the call graph for this function:

Member Data Documentation

◆ biomes

◆ c_ore

◆ c_wherein

◆ clust_num_ores

s16 Ore::clust_num_ores

Referenced by cloneTo(), and OreScatter::generate().

◆ clust_scarcity

u32 Ore::clust_scarcity

◆ clust_size

s16 Ore::clust_size

◆ flags

◆ needs_noise

const bool Ore::needs_noise

◆ noise

◆ np

◆ nthresh

◆ ore_param2

◆ y_max

s16 Ore::y_max

Referenced by cloneTo(), and placeOre().

◆ y_min

s16 Ore::y_min

Referenced by cloneTo(), and placeOre().


The documentation for this class was generated from the following files: