#pragma once #include #include #include #include class FlatLayerInfo; class FlatGeneratorInfo { public: static const int SERIALIZATION_VERSION = 2; static const std::string STRUCTURE_VILLAGE; static const std::string STRUCTURE_BIOME_SPECIFIC; static const std::string STRUCTURE_STRONGHOLD; static const std::string STRUCTURE_MINESHAFT; static const std::string STRUCTURE_BIOME_DECORATION; static const std::string STRUCTURE_LAKE; static const std::string STRUCTURE_LAVA_LAKE; static const std::string STRUCTURE_DUNGEON; private: std::vector layers; std::unordered_map > structures; int biome; public: FlatGeneratorInfo(); ~FlatGeneratorInfo(); int getBiome(); void setBiome(int biome); std::unordered_map >* getStructures(); std::vector* getLayers(); void updateLayers(); std::string toString(); private: static FlatLayerInfo* getLayerFromString(const std::string& input, int yOffset); static std::vector* getLayersFromString( const std::string& input); public: static FlatGeneratorInfo* fromValue(const std::string& input); static FlatGeneratorInfo* getDefault(); };