World.h 457 B

1234567891011121314151617181920212223
  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. mutable bool dirty;
  10. World(const BlockRegistry& blockRegistry);
  11. void setBlock(int x, int y, int z, const Block& block);
  12. const Block& getBlock(int x, int y, int z) const;
  13. int getSize() const;
  14. int getHeight() const;
  15. };
  16. #endif