#ifndef BLOCKREGISTRY_H #define BLOCKREGISTRY_H #include #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 registry; BlockId idCounter; }; #endif