From 23b0bc4d1ddc9fad3c32e8257497ddd13ac6a155 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 31 Oct 2022 06:24:34 +0100 Subject: Proto biomes and new blocks --- src/World/BiomeType.hpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/World/BiomeType.hpp (limited to 'src/World/BiomeType.hpp') diff --git a/src/World/BiomeType.hpp b/src/World/BiomeType.hpp new file mode 100644 index 0000000..026b3ef --- /dev/null +++ b/src/World/BiomeType.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include +#include + +namespace MC::World { + +class BiomeType { +public: + enum Value : uint8_t { + Forest, + Plains, + Desert, + Ocean, + }; + + static constexpr const size_t Size = 4; + + BiomeType() = default; + BiomeType(Value biome) : m_biome(biome) {} + + operator Value() const { return m_biome; } + + static std::vector all() { + return { + Plains, Forest, Desert, Ocean + }; + } + + static std::vector all_ground() { + return { + Plains, Forest, Desert + }; + } + +private: + + + Value m_biome; +}; + +} \ No newline at end of file -- cgit 1.4.1