LeviLamina
Loading...
Searching...
No Matches
ActorDefinitionGroup.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/debug/log/LogArea.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/puv/LoadResult.h"
10#include "mc/deps/puv/SlicedLoader.h"
11#include "mc/resources/JsonBetaState.h"
12#include "mc/world/actor/ActorDefinitionParseStatus.h"
13
14// auto generated forward declare list
15// clang-format off
16class ActorDefinition;
20class Experiments;
23class Level;
25class PackInstance;
27class SemVersion;
29namespace Core { class Path; }
30namespace Json { class Value; }
31namespace Puv { class Input; }
32namespace SharedTypes::v1_21_90 { struct ActorDefinitions; }
33namespace SharedTypes::v1_21_90 { struct ActorDocument; }
34// clang-format on
35
37public:
38 // ActorDefinitionGroup inner types declare
39 // clang-format off
40 struct EDLWrapper;
41 struct LoadActorResult;
42 // clang-format on
43
44 // ActorDefinitionGroup inner types define
45 struct EDLWrapper {
46 public:
47 // member variables
48 // NOLINTBEGIN
50 // NOLINTEND
51
52 public:
53 // prevent constructor by default
54 EDLWrapper& operator=(EDLWrapper const&);
55 EDLWrapper(EDLWrapper const&);
56 EDLWrapper();
57 };
58
59 enum class LoadStatus : int {
60 Success = 0,
61 FailedToParseIdentifier = 1,
62 InvalidNamespaceInIdentifier = 2,
63 DefinitionAlreadyDefined = 3,
64 FailedToLoadFromJSON = 4,
65 InvalidIdentifier = 5,
66 };
67
69 public:
70 // member variables
71 // NOLINTBEGIN
75 // NOLINTEND
76
77 public:
78 // prevent constructor by default
79 LoadActorResult& operator=(LoadActorResult const&);
82
83 public:
84 // member functions
85 // NOLINTBEGIN
87 // NOLINTEND
88
89 public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCNAPI void $dtor();
93 // NOLINTEND
94 };
95
96public:
97 // member variables
98 // NOLINTBEGIN
109 // NOLINTEND
110
111public:
112 // prevent constructor by default
116
117public:
118 // virtual functions
119 // NOLINTBEGIN
120 // vIndex: 0
121 virtual ~ActorDefinitionGroup() /*override*/;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
128 ::Level& level,
129 ::ResourcePackManager& resourcePackManager,
130 ::IMinecraftEventing& eventing,
131 ::Experiments const& experiments,
133 );
134
135 MCNAPI void _getResources(::Level& level);
136
138 ::Puv::Input const& input,
139 ::SemVersion const& formatVersion,
140 ::IPackLoadContext& packLoadContext,
141 ::std::string const& relativeResourceFilepath,
142 ::JsonBetaState useBetaFeatures,
143 ::std::string const& identifier,
144 ::Level& level,
145 ::LogArea logArea
146 );
147
148 MCNAPI ::ActorDefinitionGroup::LoadActorResult _loadActorDefinition(
149 ::Level& level,
150 ::IPackLoadContext& packLoadContext,
151 ::std::string const& relativeResourceFilepath,
152 ::Json::Value& root,
153 ::std::unordered_set<::std::string>& definitions,
154 ::LogArea logArea
155 );
156
158 ::SemVersion const& formatVersion,
159 ::IPackLoadContext& packLoadContext,
160 ::std::string const& relativeResourceFilepath,
161 ::Json::Value minecraftEntityNode,
162 ::JsonBetaState useBetaFeatures,
163 ::std::string const& identifier,
164 ::Level& level,
165 ::LogArea logArea
166 );
167
168 MCNAPI ::Puv::LoadResult<::SharedTypes::v1_21_90::ActorDocument> _loadEntityNode(
169 ::Puv::Input const& input,
170 ::SemVersion const& formatVersion,
171 ::IPackLoadContext& packLoadContext,
172 ::JsonBetaState useBetaFeatures,
174 ) const;
175
176 MCNAPI ::ActorDefinitionParseStatus _loadTemplates(
177 ::Level& level,
178 ::std::string const& base,
179 ::std::unordered_map<::std::string, ::SharedTypes::v1_21_90::ActorDefinitions>& componentsGroup,
180 ::SemVersion const& formatVersion,
181 ::IPackLoadContext const& packLoadContext,
182 ::JsonBetaState useBetaFeatures
183 );
184
186
188
189 MCNAPI void _setupPropertyGroups(::Level& level, ::ActorDefinition const& def);
190
191 MCNAPI ::std::vector<::std::string> buildActorEventList() const;
192
193 MCNAPI ::ActorDefinitionPtr tryGetDefinitionGroup(::std::string const& base, ::std::string const& definitionId);
194 // NOLINTEND
195
196public:
197 // static functions
198 // NOLINTBEGIN
199 MCNAPI static void forEachComponentOf(
200 ::Json::Value& entityValue,
201 ::std::string const& componentName,
202 ::std::function<void(::Json::Value&, ::Json::Value&)> const& callback
203 );
204
206 ::Json::Value const& root,
207 ::SemVersion const& formatVersion,
208 ::std::string& identifier
209 );
210
212 ::Json::Value const& root,
213 ::SemVersion const& formatVersion,
214 ::std::string& runtimeIdentifier
215 );
216
217 MCNAPI static bool
218 tryReadEntityResourceFile(::PackInstance& packInstance, ::Core::Path const& resource, ::Json::Value& outputRoot);
219 // NOLINTEND
220
221public:
222 // constructor thunks
223 // NOLINTBEGIN
224 MCNAPI void* $ctor(
225 ::Level& level,
226 ::ResourcePackManager& resourcePackManager,
227 ::IMinecraftEventing& eventing,
228 ::Experiments const& experiments,
230 );
231 // NOLINTEND
232
233public:
234 // destructor thunk
235 // NOLINTBEGIN
236 MCNAPI void $dtor();
237 // NOLINTEND
238
239public:
240 // vftables
241 // NOLINTBEGIN
242 MCNAPI static void** $vftable();
243 // NOLINTEND
244};
Definition ActorDefinitionGroup.h:36
MCAPI ActorDefinitionGroup(::Level &level, ::ResourcePackManager &resourcePackManager, ::IMinecraftEventing &eventing, ::Experiments const &experiments, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > linkedAssetValidator)
static MCAPI bool loadActorDefinitionRuntimeIdentifier(::Json::Value const &root, ::SemVersion const &formatVersion, ::std::string &runtimeIdentifier)
MCAPI void _removeRef(::ActorDefinitionPtr &ptr)
MCAPI void _setupPropertyGroups(::Level &level, ::ActorDefinition const &def)
MCAPI ::Puv::LoadResult<::SharedTypes::v1_21_90::ActorDocument > _loadEntityNode(::Puv::Input const &input, ::SemVersion const &formatVersion, ::IPackLoadContext &packLoadContext, ::JsonBetaState useBetaFeatures, ::ActorMigratedDefinitionFactory const &factory) const
MCAPI::ActorDefinitionParseStatus _loadTemplates(::Level &level, ::std::string const &base, ::std::unordered_map<::std::string, ::SharedTypes::v1_21_90::ActorDefinitions > &componentsGroup, ::SemVersion const &formatVersion, ::IPackLoadContext const &packLoadContext, ::JsonBetaState useBetaFeatures)
static MCAPI void ** $vftable()
MCAPI void _getResources(::Level &level)
static MCAPI bool loadActorDefinitionIdentifier(::Json::Value const &root, ::SemVersion const &formatVersion, ::std::string &identifier)
MCAPI::ActorDefinitionPtr tryGetDefinitionGroup(::std::string const &base, ::std::string const &definitionId)
static MCAPI void forEachComponentOf(::Json::Value &entityValue, ::std::string const &componentName, ::std::function< void(::Json::Value &, ::Json::Value &)> const &callback)
MCAPI void _setupCommonResourceDefinitionMap(::ActorDefinition &def, ::Level &level)
MCAPI void * $ctor(::Level &level, ::ResourcePackManager &resourcePackManager, ::IMinecraftEventing &eventing, ::Experiments const &experiments, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > linkedAssetValidator)
MCAPI::ActorDefinitionGroup::LoadActorResult _loadActorDefinition(::Level &level, ::IPackLoadContext &packLoadContext, ::std::string const &relativeResourceFilepath, ::Json::Value &root, ::std::unordered_set<::std::string > &definitions, ::LogArea logArea)
static MCAPI bool tryReadEntityResourceFile(::PackInstance &packInstance, ::Core::Path const &resource, ::Json::Value &outputRoot)
MCAPI bool _loadDefinitionFromJSON(::SemVersion const &formatVersion, ::IPackLoadContext &packLoadContext, ::std::string const &relativeResourceFilepath, ::Json::Value minecraftEntityNode, ::JsonBetaState useBetaFeatures, ::std::string const &identifier, ::Level &level, ::LogArea logArea)
MCAPI void $dtor()
MCAPI ::std::vector<::std::string > buildActorEventList() const
MCAPI bool _initActorDefinition(::Puv::Input const &input, ::SemVersion const &formatVersion, ::IPackLoadContext &packLoadContext, ::std::string const &relativeResourceFilepath, ::JsonBetaState useBetaFeatures, ::std::string const &identifier, ::Level &level, ::LogArea logArea)
Definition ActorDefinitionPtr.h:11
Definition ActorDefinition.h:21
Definition ActorMigratedDefinitionFactory.h:18
Definition BedrockLoadContext.h:14
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Path.h:17
Definition Experiments.h:14
Definition IMinecraftEventing.h:144
Definition IPackLoadContext.h:20
Definition Value.h:16
Definition Level.h:239
Definition LinkedAssetValidator.h:8
Definition PackInstance.h:23
Definition Path.h:16
Definition Input.h:14
Definition ResourcePackManager.h:24
Definition SemVersion.h:16
Definition ActorDefinitionGroup.h:45
Definition ActorDefinitionGroup.h:68
Definition ActorMigratedDefinitionCustomData.h:5
Definition Alias.h:14