12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #pragma once
- #include <Either.h>
- #include <JSON.h>
- #include <ReferenceCounter.h>
- #include "GeneratorRule.h"
- #include "JNoise.h"
- #include "JsonExpression.h"
- #include "StructureCollection.h"
- class Block;
- class Noise;
- class BiomGenerator : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::Text name;
- Framework::RCArray<StructureTemplateCollection> templates;
- Framework::RCArray<GeneratorRule> rules;
- JBoolExpression* condition;
- Framework::Vec3<int> minStructureOffset;
- Framework::Vec3<int> maxStructureOffset;
- protected:
- int seed;
- public:
- BiomGenerator(
- Framework::JSON::JSONValue* zConfig, JExpressionMemory* zMemory);
- Framework::Either<Block*, int> generateBlock(int x,
- int y,
- int z,
- int dimensionId,
- JExpressionMemory* zMemory,
- Chunk* partialGeneratedChunk);
- bool isApplicable(JExpressionMemory* zMemory);
- void generateStructures(int x,
- int y,
- int z,
- int dimensionId,
- JExpressionMemory* zMemory,
- Framework::Vec3<int> minPos,
- Framework::Vec3<int> maxPos,
- Framework::RCArray<GeneratedStructure>* zResult);
- const Framework::RCArray<StructureTemplateCollection>& getTemplates() const;
- Framework::Vec3<int> getMinStructureOffset() const;
- Framework::Vec3<int> getMaxStructureOffset() const;
- static Framework::JSON::Validator::JSONValidator* getConfigValidator();
- };
|