TreeTemplate.h 810 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "GeneratorTemplate.h"
  3. class TreeTemplate : public GeneratorTemplate
  4. {
  5. private:
  6. int woodBlockTypeId;
  7. int leaveBlockType;
  8. int minHeight;
  9. int maxHeight;
  10. public:
  11. TreeTemplate(float propability,
  12. int woodBlockTypeId,
  13. int leaveBlockType,
  14. int minHeight,
  15. int maxHeight);
  16. virtual GeneratedStructure* generateAt(
  17. Framework::Vec3<int> location, Noise* zNoise, int dimensionId) override;
  18. const BlockType* getWoodType() const;
  19. const BlockType* getLeavesType() const;
  20. };
  21. class TreeTemplateFactory : public GeneratorTemplateFactory
  22. {
  23. public:
  24. TreeTemplateFactory();
  25. GeneratorTemplate* createTemplate(
  26. Framework::JSON::JSONValue* zConfig) override;
  27. Framework::JSON::Validator::JSONValidator* getValidator() override;
  28. };