diff options
Diffstat (limited to 'src/Info.hpp')
-rw-r--r-- | src/Info.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Info.hpp b/src/Info.hpp index 6f69c56..478e858 100644 --- a/src/Info.hpp +++ b/src/Info.hpp @@ -29,6 +29,7 @@ #include <climits> #include <cstdint> #include <set> +#include <tuple> #include <utility> @@ -39,8 +40,10 @@ private: std::set<std::pair<int, int>> regions; int minX, maxX, minZ, maxZ; + int32_t spawnX, spawnZ; + public: - Info() : minX(INT_MAX), maxX(INT_MIN), minZ(INT_MAX), maxZ(INT_MIN) {} + Info() : minX(INT_MAX), maxX(INT_MIN), minZ(INT_MAX), maxZ(INT_MIN), spawnX(0), spawnZ(0) {} void addRegion(int x, int z) { regions.insert(std::make_pair(x, z)); @@ -51,6 +54,10 @@ public: if (z > maxZ) maxZ = z; } + void setSpawn(const std::pair<int32_t, int32_t> &v) { + std::tie(spawnX, spawnZ) = v; + } + void writeJSON(const char *filename); }; |