#include "BlockRegistry.h" Block BlockRegistry::NULL_BLOCK(0); BlockRegistry::BlockRegistry() : idCounter(1) { } const Block& BlockRegistry::getBlock(const std::string& name) const { const std::unordered_map::const_iterator& iter = registry.find(name); if(iter == registry.end()) { return NULL_BLOCK; } return iter->second; } const Block& BlockRegistry::getBlock(BlockId id) const { return NULL_BLOCK; }