21class FeatureRegistry {
29 struct FeatureBinaryJsonFormat {
33 ::ll::TypedStorage<8, 32, ::std::string> featureName;
34 ::ll::TypedStorage<8, 32, ::std::string> binaryJsonOutput;
39 FeatureBinaryJsonFormat& operator=(FeatureBinaryJsonFormat
const&);
40 FeatureBinaryJsonFormat();
49 MCAPI ~FeatureBinaryJsonFormat();
68 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator>> mValidator;
69 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::IFeature>>> mFeatureRegistry;
70 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::IFeature>>> mFeatureSlots;
71 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, uint64>> mFeatureLookupMap;
72 ::ll::TypedStorage<8, 24, ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat>> mFeatureSerializeData;
73 ::ll::TypedStorage<1, 1, bool> mClientInitialized;
74 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLargeFeaturePasses;
75 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mSmallFeaturePasses;
87 MCAPI
void _registerFeature(::std::string
const& name, ::std::unique_ptr<::IFeature> featurePtr);
90 MCAPI
bool _setupFeature(
94 ::std::string
const& featureName,
95 ::std::string
const& jsonDefinition,
97 bool serializeFeatures
101 MCAPI
bool _setupFeature(
105 ::std::string
const& featureName,
108 bool serializeFeatures
111 MCAPI
bool isFeaturePassDefined(::std::string
const& featurePass)
const;
113 MCAPI
void loadFromDefinitions(
116 bool clientSideGenEnabled
120 MCAPI
void loadFromJsonData(
123 ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat>
const& jsonData
127 MCAPI ::WeakRef<::IFeature> lookupByName(::std::string
const& name)
const;
129 MCAPI ::WeakRef<::IFeature> reserveFeature(::std::string
const& name);
131 MCAPI
void setLargeFeaturePasses(::std::vector<::std::string> largeFeaturePasses);
133 MCAPI
void setSmallFeaturePasses(::std::vector<::std::string> smallFeaturePasses);
139 MCAPI static ::std::string
140 _featureIdentifierFromInput(::std::string_view filePath,
::Json::Value const& jsonDefinition);
146 MCAPI static ::std::string
const& AFTER_SKY_PASS();
148 MCAPI static ::std::string
const& AFTER_SURFACE_PASS();
150 MCAPI static ::std::string
const& AFTER_UNDERGROUND_PASS();
152 MCAPI static ::std::string
const& BEFORE_SKY_PASS();
154 MCAPI static ::std::string
const& BEFORE_SURFACE_PASS();
156 MCAPI static ::std::string
const& BEFORE_UNDERGROUND_PASS();
158 MCAPI static ::std::string
const& FINAL_PASS();
160 MCAPI static ::std::string
const& FIRST_PASS();
162 MCAPI static ::std::string
const& PREGENERATION_PASS();
164 MCAPI static ::std::string
const& SKY_PASS();
166 MCAPI static ::std::string
const& SURFACE_PASS();
168 MCAPI static ::std::string
const& UNDERGROUND_PASS();