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;
16// clang-format on
17
18class FeatureRegistry {
19public:
20 // FeatureRegistry inner types declare
21 // clang-format off
23 // clang-format on
24
25 // FeatureRegistry inner types define
26 struct FeatureBinaryJsonFormat {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 32, ::std::string> featureName;
31 ::ll::TypedStorage<8, 32, ::std::string> binaryJsonOutput;
32 // NOLINTEND
33
34 public:
35 // prevent constructor by default
36 FeatureBinaryJsonFormat(FeatureBinaryJsonFormat const&);
37 FeatureBinaryJsonFormat();
38
39 public:
40 // member functions
41 // NOLINTBEGIN
42 MCFOLD ::FeatureRegistry::FeatureBinaryJsonFormat& operator=(::FeatureRegistry::FeatureBinaryJsonFormat&&);
43
44 MCFOLD ::FeatureRegistry::FeatureBinaryJsonFormat& operator=(::FeatureRegistry::FeatureBinaryJsonFormat const&);
45
46 MCFOLD bool operator==(::FeatureRegistry::FeatureBinaryJsonFormat const& rhs) const;
47
48 MCAPI ~FeatureBinaryJsonFormat();
49 // NOLINTEND
50
51 public:
52 // destructor thunk
53 // NOLINTBEGIN
54 MCFOLD void $dtor();
55 // NOLINTEND
56 };
57
58public:
59 // member variables
60 // NOLINTBEGIN
61 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::IFeature>>> mFeatureRegistry;
62 ::ll::TypedStorage<8, 24, ::std::vector<::OwnerPtr<::IFeature>>> mFeatureSlots;
63 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, uint64>> mFeatureLookupMap;
64 ::ll::TypedStorage<8, 24, ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat>> mFeatureSerializeData;
65 ::ll::TypedStorage<1, 1, bool> mClientInitialized;
66 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mLargeFeaturePasses;
67 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mSmallFeaturePasses;
68 // NOLINTEND
69
70public:
71 // member functions
72 // NOLINTBEGIN
73 MCAPI FeatureRegistry();
74
75 MCAPI ::std::string const _featureNamespaceFromInput(::std::string const& filePath, ::std::string const& contents);
76
77 MCAPI void _registerFeature(::std::string const& name, ::std::unique_ptr<::IFeature> featurePtr);
78
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
89 MCAPI void loadFromDefinitions(
90 ::IWorldRegistriesProvider& worldRegistries,
91 ::ResourcePackManager const& rpm,
92 bool clientSideGenEnabled
93 );
94
95 MCAPI_C void loadFromJsonData(
96 ::IWorldRegistriesProvider& worldRegistries,
97 ::ResourcePackManager const& rpm,
98 ::std::vector<::FeatureRegistry::FeatureBinaryJsonFormat> const& jsonData
99 );
100
101 MCAPI ::WeakRef<::IFeature> lookupByName(::std::string const& name) const;
102
103 MCAPI ::WeakRef<::IFeature> lookupOrReserveFeature(::std::string const& featureName);
104
105 MCAPI ::WeakRef<::IFeature> reserveFeature(::std::string const& name);
106
107 MCAPI_C void setLargeFeaturePasses(::std::vector<::std::string> largeFeaturePasses);
108
109 MCAPI_C void setSmallFeaturePasses(::std::vector<::std::string> smallFeaturePasses);
110
111 MCAPI ~FeatureRegistry();
112 // NOLINTEND
113
114public:
115 // static variables
116 // NOLINTBEGIN
117 MCAPI static ::std::string const& AFTER_SKY_PASS();
118
119 MCAPI static ::std::string const& AFTER_SURFACE_PASS();
120
121 MCAPI static ::std::string const& AFTER_UNDERGROUND_PASS();
122
123 MCAPI static ::std::string const& BEFORE_SKY_PASS();
124
125 MCAPI static ::std::string const& BEFORE_SURFACE_PASS();
126
127 MCAPI static ::std::string const& BEFORE_UNDERGROUND_PASS();
128
129 MCAPI static ::std::string const& FINAL_PASS();
130
131 MCAPI static ::std::string const& FIRST_PASS();
132
133 MCAPI static ::std::string const& PREGENERATION_PASS();
134
135 MCAPI static ::std::string const& SKY_PASS();
136
137 MCAPI static ::std::string const& SURFACE_PASS();
138
139 MCAPI static ::std::string const& UNDERGROUND_PASS();
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCAPI void* $ctor();
146 // NOLINTEND
147
148public:
149 // destructor thunk
150 // NOLINTBEGIN
151 MCAPI void $dtor();
152 // NOLINTEND
153};
Definition HashedString.h:5
Definition IFeature.h:18
Definition IWorldRegistriesProvider.h:25
Definition MinEngineVersion.h:10
Definition ResourcePackManager.h:29
Definition FeatureRegistry.h:26