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;
- void fromJson(BlockInstanceGeneratorRule* zResult,
- Framework::JSON::JSONObject* zJson) const override;
- void toJson(BlockInstanceGeneratorRule* zObject,
- Framework::JSON::JSONObject* zResult) const override;
- JSONObjectValidationBuilder* addToValidator(
- JSONObjectValidationBuilder* builder) const override;
- Framework::Text getTypeToken() const override;
- };
|