WorldGenerator.h 534 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <Thread.h>
  3. #include <Critical.h>
  4. #include "DimensionGenerator.h"
  5. #include "Area.h"
  6. class WorldGenerator : public Framework::Thread
  7. {
  8. private:
  9. Framework::Critical cs;
  10. Framework::Array<Area> requestQueue;
  11. bool exit;
  12. int seed;
  13. public:
  14. WorldGenerator( int seed );
  15. ~WorldGenerator();
  16. void thread() override;
  17. void requestGeneration( Area request );
  18. void exitAndWait();
  19. Framework::Either<Block*, int> generateSingleBlock( Framework::Vec3<int> location, int dimensionId );
  20. };