};
#endif
-class Decoration : public GenElement {
+class Decoration : public GenElement, public NodeResolver {
public:
INodeDefManager *ndef;
int mapseed;
std::vector<content_t> c_place_on;
s16 sidelen;
+ s16 y_min;
+ s16 y_max;
float fill_ratio;
NoiseParams np;
Decoration();
virtual ~Decoration();
+ virtual void resolveNodeNames(NodeResolveInfo *nri);
+
size_t placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
s16 deco_height_max;
s16 nspawnby;
- ~DecoSimple() {}
+ virtual void resolveNodeNames(NodeResolveInfo *nri);
bool canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p);
virtual size_t generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p);
Schematic *schematic;
std::string filename;
- ~DecoSchematic() {}
-
virtual size_t generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p);
virtual int getHeight();
};
static const char *ELEMENT_TITLE;
static const size_t ELEMENT_LIMIT = 0x10000;
- DecorationManager(IGameDef *gamedef) {}
+ DecorationManager(IGameDef *gamedef);
~DecorationManager() {}
Decoration *create(int type)
}
}
+ void clear();
+
size_t placeAllDecos(Mapgen *mg, u32 seed, v3s16 nmin, v3s16 nmax);
};