LeviLamina
Loading...
Searching...
No Matches
FeatureRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/OwnerPtr.h"
7#include "mc/deps/game_refs/WeakRef.h"
8
9// auto generated forward declare list
10// clang-format off
11class HashedString;
12class IFeature;
16namespace Json { class Value; }
17// clang-format on
18
19class FeatureRegistry {
20public:
21 // FeatureRegistry inner types declare
22 // clang-format off
24 // clang-format on
25
26 // FeatureRegistry inner types define
27 struct FeatureBinaryJsonFormat {
28 public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 32, ::std::string> featureName;
32 ::ll::TypedStorage<8, 32, ::std::string> binaryJsonOutput;
33 // NOLINTEND
34
35 public:
36 // prevent constructor by default
37 FeatureBinaryJsonFormat(FeatureBinaryJsonFormat const&);
38 FeatureBinaryJsonFormat();
39
40 public:
41 // member functions
42 // NOLINTBEGIN
43 MCFOLD ::FeatureRegistry::FeatureBinaryJsonFormat& operator=(::FeatureRegistry::FeatureBinaryJsonFormat&&);
44
45 MCFOLD ::FeatureRegistry::FeatureBinaryJsonFormat& operator=(::FeatureRegistry::FeatureBinaryJsonFormat const&);
46
47 MCFOLD bool operator==(::FeatureRegistry::FeatureBinaryJsonFormat const& rhs) const;
48
49 MCAPI ~FeatureBinaryJsonFormat();
50 // NOLINTEND
51
52 public:
53 // destructor thunk
54 // NOLINTBEGIN
55 MCFOLD void $dtor();
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::IFeature>>> mFeatureRegistry;
63 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::IFeature>>> mFeatureSlots;
64 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, uint64>> mFeatureLookupMap;
65 ::ll::TypedStorage<8, 24, ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat>> mFeatureSerializeData;
66 ::ll::TypedStorage<1, 1, bool> mClientInitialized;
67 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLargeFeaturePasses;
68 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mSmallFeaturePasses;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI FeatureRegistry();
75
76 MCAPI void _registerFeature(::std::string const& name, ::std::unique_ptr<::IFeature> featurePtr);
77
78#ifdef LL_PLAT_C
79 MCAPI bool _setupFeature(
80 ::IWorldRegistriesProvider& worldRegistries,
81 bool isBasePack,
82 ::ResourcePackManager const& rpm,
83 ::std::string const& featureName,
84 ::std::string const& jsonDefinition,
85 ::MinEngineVersion const& minEngineVersion,
86 bool serializeFeatures
87 );
88#endif
89
90 MCAPI bool _setupFeature(
91 ::IWorldRegistriesProvider& worldRegistries,
92 bool isBasePack,
93 ::ResourcePackManager const& rpm,
94 ::std::string const& featureName,
95 ::Json::Value const& jsonDefinition,
96 ::MinEngineVersion const& minEngineVersion,
97 bool serializeFeatures
98 );
99
100 MCAPI void loadFromDefinitions(
101 ::IWorldRegistriesProvider& worldRegistries,
102 ::ResourcePackManager const& rpm,
103 bool clientSideGenEnabled
104 );
105
106#ifdef LL_PLAT_C
107 MCAPI void loadFromJsonData(
108 ::IWorldRegistriesProvider& worldRegistries,
109 ::ResourcePackManager const& rpm,
110 ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat> const& jsonData
111 );
112#endif
113
114 MCAPI ::WeakRef<::IFeature> lookupByName(::std::string const& name) const;
115
116 MCAPI ::WeakRef<::IFeature> lookupOrReserveFeature(::std::string const& featureName);
117
118 MCAPI ::WeakRef<::IFeature> reserveFeature(::std::string const& name);
119
120#ifdef LL_PLAT_C
121 MCAPI void setLargeFeaturePasses(::std::vector<::std::string> largeFeaturePasses);
122
123 MCAPI void setSmallFeaturePasses(::std::vector<::std::string> smallFeaturePasses);
124#endif
125
126 MCAPI ~FeatureRegistry();
127 // NOLINTEND
128
129public:
130 // static functions
131 // NOLINTBEGIN
132 MCAPI static ::std::string
133 _featureIdentifierFromInput(::std::string_view filePath, ::Json::Value const& jsonDefinition);
134 // NOLINTEND
135
136public:
137 // static variables
138 // NOLINTBEGIN
139 MCAPI static ::std::string const& AFTER_SKY_PASS();
140
141 MCAPI static ::std::string const& AFTER_SURFACE_PASS();
142
143 MCAPI static ::std::string const& AFTER_UNDERGROUND_PASS();
144
145 MCAPI static ::std::string const& BEFORE_SKY_PASS();
146
147 MCAPI static ::std::string const& BEFORE_SURFACE_PASS();
148
149 MCAPI static ::std::string const& BEFORE_UNDERGROUND_PASS();
150
151 MCAPI static ::std::string const& FINAL_PASS();
152
153 MCAPI static ::std::string const& FIRST_PASS();
154
155 MCAPI static ::std::string const& PREGENERATION_PASS();
156
157 MCAPI static ::std::string const& SKY_PASS();
158
159 MCAPI static ::std::string const& SURFACE_PASS();
160
161 MCAPI static ::std::string const& UNDERGROUND_PASS();
162 // NOLINTEND
163
164public:
165 // constructor thunks
166 // NOLINTBEGIN
167 MCAPI void* $ctor();
168 // NOLINTEND
169
170public:
171 // destructor thunk
172 // NOLINTBEGIN
173 MCAPI void $dtor();
174 // NOLINTEND
175};
Definition HashedString.h:5
Definition IFeature.h:18
Definition IWorldRegistriesProvider.h:25
Definition Value.h:16
Definition MinEngineVersion.h:10
Definition ResourcePackManager.h:30
Definition FeatureRegistry.h:27