diff options
| author | Mel <einebeere@gmail.com> | 2022-10-31 06:24:34 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-31 06:24:34 +0100 |
| commit | 23b0bc4d1ddc9fad3c32e8257497ddd13ac6a155 (patch) | |
| tree | 16ac3e0fa2964f026c857daa4ff6f0ca11520d46 /src/World/BiomeType.hpp | |
| parent | 1b2b0069c9b7ad73c6cc6663b020d0fd894f4567 (diff) | |
| download | meowcraft-23b0bc4d1ddc9fad3c32e8257497ddd13ac6a155.tar.zst meowcraft-23b0bc4d1ddc9fad3c32e8257497ddd13ac6a155.zip | |
Proto biomes and new blocks
Diffstat (limited to 'src/World/BiomeType.hpp')
| -rw-r--r-- | src/World/BiomeType.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
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 <cstdint> +#include <vector> + +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<BiomeType> all() { + return { + Plains, Forest, Desert, Ocean + }; + } + + static std::vector<BiomeType> all_ground() { + return { + Plains, Forest, Desert + }; + } + +private: + + + Value m_biome; +}; + +} \ No newline at end of file |
