World.h 432 B

123456789101112131415161718192021
  1. #ifndef WORLD_H
  2. #define WORLD_H
  3. #include "common/block/BlockRegistry.h"
  4. #include "common/world/BlockStorage.h"
  5. class World final {
  6. const BlockRegistry& blockRegistry;
  7. BlockStorage blocks;
  8. public:
  9. World(const BlockRegistry& blockRegistry);
  10. void setBlock(int x, int y, int z, const Block& block);
  11. const Block& getBlock(int x, int y, int z) const;
  12. int getSize() const;
  13. int getHeight() const;
  14. };
  15. #endif