diff options
Diffstat (limited to 'src/mapgen.h')
-rw-r--r-- | src/mapgen.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mapgen.h b/src/mapgen.h index 9bb7d03b8..abc3d2e89 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -181,6 +181,13 @@ public: virtual void makeChunk(BlockMakeData *data) {} virtual int getGroundLevelAtPoint(v2s16 p) { return 0; } + // getSpawnLevelAtPoint() is a function within each mapgen that returns a + // suitable y co-ordinate for player spawn ('suitable' usually meaning + // within 16 nodes of water_level). If a suitable spawn level cannot be + // found at the specified (X, Z) 'MAX_MAP_GENERATION_LIMIT' is returned to + // signify this and to cause Server::findSpawnPos() to try another (X, Z). + virtual int getSpawnLevelAtPoint(v2s16 p) { return 0; } + private: DISABLE_CLASS_COPY(Mapgen); }; |