123456789101112131415161718192021222324 |
- #ifndef BLOCKREGISTRY_H
- #define BLOCKREGISTRY_H
- #include <unordered_map>
- #include "common/block/Block.h"
- class BlockRegistry
- {
- public:
- static Block NULL_BLOCK;
-
- BlockRegistry();
-
- const Block& getBlock(const std::string&) const;
- const Block& getBlock(BlockId id) const;
-
- private:
- std::unordered_map<std::string, Block> registry;
- BlockId idCounter;
- };
- #endif
|