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/resources/JsonBetaState.h"
11#include "mc/world/actor/ActorDefinitionParseStatus.h"
12
13// auto generated forward declare list
14// clang-format off
15class ActorDefinition;
17class Experiments;
20class Level;
22class PackInstance;
24class SemVersion;
25namespace Core { class Path; }
26namespace Json { class Value; }
27namespace Puv { class Input; }
28namespace SharedTypes::v1_21_110 { struct ActorDefinitions; }
29namespace SharedTypes::v1_21_110 { struct ActorDocument; }
30// clang-format on
31
33public:
34 // ActorDefinitionGroup inner types declare
35 // clang-format off
36 struct EDLWrapper;
37 struct LoadActorResult;
38 // clang-format on
39
40 // ActorDefinitionGroup inner types define
41 struct EDLWrapper {
42 public:
43 // member variables
44 // NOLINTBEGIN
46 // NOLINTEND
47
48 public:
49 // prevent constructor by default
50 EDLWrapper& operator=(EDLWrapper const&);
51 EDLWrapper(EDLWrapper const&);
52 EDLWrapper();
53 };
54
55 enum class LoadStatus : int {
56 Success = 0,
57 FailedToParseIdentifier = 1,
58 InvalidNamespaceInIdentifier = 2,
59 DefinitionAlreadyDefined = 3,
60 FailedToLoadFromJSON = 4,
61 InvalidIdentifier = 5,
62 };
63
65 public:
66 // member variables
67 // NOLINTBEGIN
72 // NOLINTEND
73
74 public:
75 // prevent constructor by default
76 LoadActorResult& operator=(LoadActorResult const&);
79
80 public:
81 // member functions
82 // NOLINTBEGIN
84 // NOLINTEND
85
86 public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCNAPI void $dtor();
90 // NOLINTEND
91 };
92
93public:
94 // member variables
95 // NOLINTBEGIN
105 // NOLINTEND
106
107public:
108 // prevent constructor by default
112
113public:
114 // virtual functions
115 // NOLINTBEGIN
116 // vIndex: 0
117 virtual ~ActorDefinitionGroup() /*override*/;
118 // NOLINTEND
119
120public:
121 // member functions
122 // NOLINTBEGIN
124 ::Level& level,
125 ::ResourcePackManager& resourcePackManager,
126 ::IMinecraftEventing& eventing,
127 ::Experiments const& experiments,
129 );
130
131 MCNAPI void _getResources(::Level& level);
132
133 MCNAPI ::Puv::LoadResult<::SharedTypes::v1_21_110::ActorDocument> _initActorDefinition(
134 ::Puv::Input const& input,
135 ::SemVersion const& formatVersion,
136 ::IPackLoadContext& packLoadContext,
137 ::std::string const& relativeResourceFilepath,
138 ::JsonBetaState useBetaFeatures,
139 ::std::string const& identifier,
140 ::Level& level,
141 ::LogArea logArea
142 );
143
144 MCNAPI ::ActorDefinitionGroup::LoadActorResult _loadActorDefinition(
145 ::Level& level,
146 ::IPackLoadContext& packLoadContext,
147 ::std::string const& relativeResourceFilepath,
148 ::Json::Value& root,
149 ::std::unordered_set<::std::string>& definitions,
150 ::LogArea logArea
151 );
152
153 MCNAPI ::Puv::LoadResult<::SharedTypes::v1_21_110::ActorDocument> _loadDefinitionFromJSON(
154 ::SemVersion const& formatVersion,
155 ::IPackLoadContext& packLoadContext,
156 ::std::string const& relativeResourceFilepath,
157 ::Json::Value minecraftEntityNode,
158 ::JsonBetaState useBetaFeatures,
159 ::std::string const& identifier,
160 ::Level& level,
161 ::LogArea logArea
162 );
163
164 MCNAPI ::ActorDefinitionParseStatus _loadTemplates(
165 ::Level& level,
166 ::std::string const& base,
167 ::std::unordered_map<::std::string, ::SharedTypes::v1_21_110::ActorDefinitions>& componentsGroup,
168 ::SemVersion const& formatVersion,
169 ::IPackLoadContext const& packLoadContext,
170 ::JsonBetaState useBetaFeatures
171 );
172
174
176
177 MCNAPI void _setupPropertyGroups(::Level& level, ::ActorDefinition const& def);
178
179 MCNAPI ::std::vector<::std::string> buildActorEventList() const;
180
181 MCNAPI ::ActorDefinitionPtr tryGetDefinitionGroup(::std::string const& base, ::std::string const& definitionId);
182 // NOLINTEND
183
184public:
185 // static functions
186 // NOLINTBEGIN
187 MCNAPI static void forEachComponentOf(
188 ::Json::Value& entityValue,
189 ::std::string const& componentName,
190 ::std::function<void(::Json::Value&, ::Json::Value&)> const& callback
191 );
192
194 ::Json::Value const& root,
195 ::SemVersion const& formatVersion,
196 ::std::string& identifier
197 );
198
200 ::Json::Value const& root,
201 ::SemVersion const& formatVersion,
202 ::std::string& runtimeIdentifier
203 );
204
205 MCNAPI static bool
206 tryReadEntityResourceFile(::PackInstance& packInstance, ::Core::Path const& resource, ::Json::Value& outputRoot);
207 // NOLINTEND
208
209public:
210 // constructor thunks
211 // NOLINTBEGIN
212 MCNAPI void* $ctor(
213 ::Level& level,
214 ::ResourcePackManager& resourcePackManager,
215 ::IMinecraftEventing& eventing,
216 ::Experiments const& experiments,
218 );
219 // NOLINTEND
220
221public:
222 // destructor thunk
223 // NOLINTBEGIN
224 MCNAPI void $dtor();
225 // NOLINTEND
226
227public:
228 // vftables
229 // NOLINTBEGIN
230 MCNAPI static void** $vftable();
231 // NOLINTEND
232};
Definition ActorDefinitionGroup.h:32
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::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::ActorDefinitionParseStatus _loadTemplates(::Level &level, ::std::string const &base, ::std::unordered_map<::std::string, ::SharedTypes::v1_21_110::ActorDefinitions > &componentsGroup, ::SemVersion const &formatVersion, ::IPackLoadContext const &packLoadContext, ::JsonBetaState useBetaFeatures)
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)
MCAPI ::Puv::LoadResult<::SharedTypes::v1_21_110::ActorDocument > _initActorDefinition(::Puv::Input const &input, ::SemVersion const &formatVersion, ::IPackLoadContext &packLoadContext, ::std::string const &relativeResourceFilepath, ::JsonBetaState useBetaFeatures, ::std::string const &identifier, ::Level &level, ::LogArea logArea)
static MCAPI bool tryReadEntityResourceFile(::PackInstance &packInstance, ::Core::Path const &resource, ::Json::Value &outputRoot)
MCAPI void $dtor()
MCAPI ::Puv::LoadResult<::SharedTypes::v1_21_110::ActorDocument > _loadDefinitionFromJSON(::SemVersion const &formatVersion, ::IPackLoadContext &packLoadContext, ::std::string const &relativeResourceFilepath, ::Json::Value minecraftEntityNode, ::JsonBetaState useBetaFeatures, ::std::string const &identifier, ::Level &level, ::LogArea logArea)
MCAPI ::std::vector<::std::string > buildActorEventList() const
Definition ActorDefinitionPtr.h:11
Definition ActorDefinition.h:80
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition Path.h:11
Definition Experiments.h:14
Definition IMinecraftEventing.h:147
Definition IPackLoadContext.h:20
Definition Value.h:16
Definition Level.h:243
Definition LinkedAssetValidator.h:8
Definition PackInstance.h:16
Definition Path.h:16
Definition Input.h:15
Definition ResourcePackManager.h:24
Definition SemVersion.h:16
Definition ActorDefinitionGroup.h:41
Definition ActorDefinitionGroup.h:64
Definition Alias.h:14