#pragma once #include "GeneratorRule.h" class BlockInstanceGeneratorRule : public GeneratorRule { private: int blockType; public: BlockInstanceGeneratorRule(); Framework::Either createBlock( int x, int y, int z, int dimensionId) override; void setBlockTypeId(int blockType); int getBlockTypeId() const; }; class BlockInstanceGeneratorRuleFactory : public GeneratorRuleFactory { public: BlockInstanceGeneratorRuleFactory(); BlockInstanceGeneratorRule* createValue( Framework::JSON::JSONObject* zJson) const override; BlockInstanceGeneratorRule* fromJson( Framework::JSON::JSONObject* zJson) const override; Framework::JSON::JSONObject* toJsonObject( BlockInstanceGeneratorRule* zObject) const override; JSONObjectValidationBuilder* addToValidator( JSONObjectValidationBuilder* builder) const override; const char* getTypeToken() const override; };