#ifndef BLOCKS_H #define BLOCKS_H #include "common/block/Block.h" #include "common/block/BlockAir.h" class BlockRegistry { public: static const Block& getBlockFromId(BlockId id); static void registerBlocks(); private: BlockRegistry(); static void init(); static void registerBlock(const Block& block); static const int BLOCK_AMOUNT; static const Block* BLOCKS[]; }; namespace Blocks { extern const BlockAir AIR; extern const Block GRASS; extern const Block DIRT; extern const Block STONE; }; #endif