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/resources/JsonBetaState.h"
10#include "mc/world/actor/ActorDefinitionParseStatus.h"
11
12// auto generated forward declare list
13// clang-format off
14class ActorDefinition;
16class Experiments;
19class Level;
21class PackInstance;
23class SemVersion;
25namespace Core { class Path; }
26namespace Json { class Value; }
27// clang-format on
28
30public:
31 // ActorDefinitionGroup inner types declare
32 // clang-format off
33 struct EDLWrapper;
34 struct LoadActorResult;
35 // clang-format on
36
37 // ActorDefinitionGroup inner types define
38 struct EDLWrapper {
39 public:
40 // member variables
41 // NOLINTBEGIN
43 // NOLINTEND
44
45 public:
46 // prevent constructor by default
47 EDLWrapper& operator=(EDLWrapper const&);
48 EDLWrapper(EDLWrapper const&);
49 EDLWrapper();
50 };
51
52 enum class LoadStatus : int {
53 Success = 0,
54 FailedToParseIdentifier = 1,
55 InvalidNamespaceInIdentifier = 2,
56 DefinitionAlreadyDefined = 3,
57 FailedToLoadFromJSON = 4,
58 InvalidIdentifier = 5,
59 };
60
62 public:
63 // member variables
64 // NOLINTBEGIN
68 // NOLINTEND
69
70 public:
71 // prevent constructor by default
72 LoadActorResult& operator=(LoadActorResult const&);
75
76 public:
77 // member functions
78 // NOLINTBEGIN
80 // NOLINTEND
81
82 public:
83 // destructor thunk
84 // NOLINTBEGIN
85 MCNAPI void $dtor();
86 // NOLINTEND
87 };
88
89public:
90 // member variables
91 // NOLINTBEGIN
101 // NOLINTEND
102
103public:
104 // prevent constructor by default
108
109public:
110 // virtual functions
111 // NOLINTBEGIN
112 // vIndex: 0
113 virtual ~ActorDefinitionGroup() /*override*/;
114 // NOLINTEND
115
116public:
117 // member functions
118 // NOLINTBEGIN
120 ::Level& level,
121 ::ResourcePackManager& resourcePackManager,
122 ::IMinecraftEventing& eventing,
123 ::Experiments const& experiments,
125 );
126
127 MCNAPI void _getResources(::Level& level);
128
129 MCNAPI ::ActorDefinitionGroup::LoadActorResult _loadActorDefinition(
130 ::Level& level,
131 ::IPackLoadContext& packLoadContext,
132 ::std::string const& relativeResourceFilepath,
133 ::Json::Value& root,
134 ::std::unordered_set<::std::string>& definitions,
135 ::LogArea logArea
136 );
137
139 ::SemVersion const& formatVersion,
140 ::IPackLoadContext& packLoadContext,
141 ::std::string const& relativeResourceFilepath,
142 ::Json::Value& minecraftEntityNode,
143 ::JsonBetaState useBetaFeatures,
144 ::std::string const& identifier,
145 ::Level& level,
146 ::LogArea logArea
147 );
148
149 MCNAPI ::ActorDefinitionParseStatus
150 _loadTemplates(::Level& level, ::std::string const& base, ::DeserializeDataParams deserializeDataParams);
151
153
155
156 MCNAPI void _setupPropertyGroups(::Level& level, ::ActorDefinition const& def);
157
158 MCNAPI ::std::vector<::std::string> buildActorEventList() const;
159
160 MCNAPI ::ActorDefinitionPtr tryGetDefinitionGroup(::std::string const& base, ::std::string const& definitionId);
161 // NOLINTEND
162
163public:
164 // static functions
165 // NOLINTBEGIN
166 MCNAPI static void forEachComponentOf(
167 ::Json::Value& entityValue,
168 ::std::string const& componentName,
169 ::std::function<void(::Json::Value&, ::Json::Value&)> const& callback
170 );
171
172 MCNAPI static void loadActorDefinitionFormatVersion(::Json::Value const& root, ::SemVersion& formatVersion);
173
175 ::Json::Value const& root,
176 ::SemVersion const& formatVersion,
177 ::std::string& identifier
178 );
179
181 ::Json::Value const& root,
182 ::SemVersion const& formatVersion,
183 ::std::string& runtimeIdentifier
184 );
185
186 MCNAPI static bool
187 tryReadEntityResourceFile(::PackInstance& packInstance, ::Core::Path const& resource, ::Json::Value& outputRoot);
188 // NOLINTEND
189
190public:
191 // constructor thunks
192 // NOLINTBEGIN
193 MCNAPI void* $ctor(
194 ::Level& level,
195 ::ResourcePackManager& resourcePackManager,
196 ::IMinecraftEventing& eventing,
197 ::Experiments const& experiments,
199 );
200 // NOLINTEND
201
202public:
203 // destructor thunk
204 // NOLINTBEGIN
205 MCNAPI void $dtor();
206 // NOLINTEND
207
208public:
209 // vftables
210 // NOLINTBEGIN
211 MCNAPI static void** $vftable();
212 // NOLINTEND
213};
Definition ActorDefinitionGroup.h:29
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)
static MCAPI void ** $vftable()
MCAPI void _getResources(::Level &level)
static MCAPI bool loadActorDefinitionIdentifier(::Json::Value const &root, ::SemVersion const &formatVersion, ::std::string &identifier)
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::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)
static MCAPI void loadActorDefinitionFormatVersion(::Json::Value const &root, ::SemVersion &formatVersion)
MCAPI void $dtor()
MCAPI::ActorDefinitionParseStatus _loadTemplates(::Level &level, ::std::string const &base, ::DeserializeDataParams deserializeDataParams)
MCAPI ::std::vector<::std::string > buildActorEventList() const
Definition ActorDefinitionPtr.h:11
Definition ActorDefinition.h:21
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Path.h:17
Definition Experiments.h:14
Definition IMinecraftEventing.h:145
Definition IPackLoadContext.h:20
Definition Value.h:16
Definition Level.h:238
Definition LinkedAssetValidator.h:8
Definition PackInstance.h:23
Definition Path.h:16
Definition ResourcePackManager.h:23
Definition SemVersion.h:15
Definition ActorDefinitionGroup.h:38
Definition ActorDefinitionGroup.h:61
Definition DeserializeDataParams.h:5
Definition Alias.h:14