1234567891011121314151617181920212223242526272829303132 |
- #pragma once
- #include "GeneratorRule.h"
- class BlockInstanceGeneratorRule : public GeneratorRule
- {
- private:
- int blockType;
- public:
- BlockInstanceGeneratorRule();
- Framework::Either<Block*, int> createBlock(
- int x, int y, int z, int dimensionId) override;
- void setBlockTypeId(int blockType);
- int getBlockTypeId() const;
- };
- class BlockInstanceGeneratorRuleFactory
- : public GeneratorRuleFactory<BlockInstanceGeneratorRule>
- {
- 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;
- };
|