BlockStorage.h 469 B

12345678910111213141516171819202122232425
  1. #ifndef BLOCKSTORAGE_H
  2. #define BLOCKSTORAGE_H
  3. #include "common/world/BlockMap.h"
  4. #include "memory/UniquePointer.h"
  5. #include "utils/List.h"
  6. class BlockStorage final {
  7. int size;
  8. int height;
  9. int sizeMask;
  10. List<UniquePointer<BlockMap>> maps;
  11. public:
  12. BlockStorage(int sizeBits, int heightBits);
  13. BlockId get(int x, int y, int z) const;
  14. void set(int x, int y, int z, BlockId id);
  15. int getSize() const;
  16. int getHeight() const;
  17. };
  18. #endif