Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ActorResourceDefinition.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/actor/HeldItemInfo.h"
7#include "mc/client/renderer/actor/SpawnEggInfo.h"
8#include "mc/deps/core/sem_ver/SemVersion.h"
9#include "mc/deps/core/string/HashedString.h"
10#include "mc/deps/minecraft_renderer/resources/MERSTextureMode.h"
11#include "mc/deps/minecraft_renderer/resources/NormalTextureMode.h"
12#include "mc/world/actor/animation/CommonResourceDefinitionMap.h"
13
14// auto generated forward declare list
15// clang-format off
18class ExpressionNode;
19class GeometryGroup;
20class GeometryPtr;
24struct ActorTextureInfo;
25struct PBRTexturePtrs;
26namespace mce { class MaterialPtr; }
27namespace mce { class TexturePtr; }
28// clang-format on
29
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<1, 1, bool const> mIsAttachable;
35 ::ll::TypedStorage<1, 1, bool> mIsOverriden;
36 ::ll::TypedStorage<8, 48, ::HashedString> mName;
37 ::ll::TypedStorage<8, 24, ::SemVersion const> mFullStackMinEngineVersion;
38 ::ll::TypedStorage<8, 24, ::SemVersion const> mActorJsonMinEngineVersion;
39 ::ll::TypedStorage<8, 48, ::HashedString> mQueryableGeometryName;
40 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::GeometryPtr>> mGeometryMap;
41 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::ActorTextureInfo>> mTextureMap;
42 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::MaterialVariants>> mMaterialVariantMap;
43 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::HashedString>> mActorParticleEffectMap;
44 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::RenderControllerPtr, ::ExpressionNode>>>
45 mRenderControllerPtrArray;
46 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ExpressionNode>> mActorScripts;
47 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::string>> mSoundEffectMap;
48 ::ll::TypedStorage<8, 24, ::HeldItemInfo> mHeldItemInfo;
49 ::ll::TypedStorage<1, 1, bool> mEnableAttachables;
50 ::ll::TypedStorage<1, 1, bool> mHideArmor;
51 ::ll::TypedStorage<8, 88, ::SpawnEggInfo> mSpawnEgg;
52 // NOLINTEND
53
54public:
55 // prevent constructor by default
56 ActorResourceDefinition& operator=(ActorResourceDefinition const&);
57 ActorResourceDefinition();
58
59public:
60 // member functions
61 // NOLINTBEGIN
62 MCNAPI ActorResourceDefinition(::ActorResourceDefinition const& rhs);
63
65 ::HashedString name,
66 bool isAttachable,
67 ::SemVersion const& fullStackMinEngineVersion,
68 ::SemVersion const& actorJsonMinEngineVersion
69 );
70
71 MCAPI ::ActorTextureInfo const getActorTextureInfo(::std::string_view name, bool returnFirstIfNotFound) const;
72
73 MCAPI ::PBRTexturePtrs const getActorTexturePtrs(::std::string const& name, bool returnFirstIfNotFound) const;
74
75 MCAPI ::mce::TexturePtr const getColorTexture(::std::string const& name, bool returnFirstIfNotFound) const;
76
77 MCAPI ::ResourceLocation const
78 getColorTextureResourceLocation(::std::string const& name, bool returnFirstIfNotFound) const;
79
80 MCAPI ::GeometryPtr const getGeometry(::std::string_view name, bool returnFirstIfNotFound) const;
81
82 MCAPI ::MaterialVariants const& getMaterialVariants(::std::string const& name) const;
83
84 MCNAPI void mergeGeometry(::std::string const& name, ::GeometryPtr geometryPtr);
85
86 MCNAPI void mergeHeldItemScale(::ExpressionNode heldItemScale);
87
88 MCNAPI void mergeMaterial(
89 ::std::string const& name,
90 ::mce::MaterialPtr skinningMaterialPtr,
91 ::mce::MaterialPtr skinningColorMaterialPtr
92 );
93
94 MCNAPI void mergeParticleEffects(::std::unordered_map<::HashedString, ::HashedString> actorParticleEffects);
95
96 MCNAPI void
97 mergeRenderControllers(::std::vector<::std::pair<::RenderControllerPtr, ::ExpressionNode>> renderControllerPtrs);
98
99 MCNAPI void mergeScript(::std::string name, ::ExpressionNode expression);
100
101 MCNAPI void mergeSoundEffects(::std::string name, ::std::string soundEffectName);
102
103 MCNAPI void mergeTexture(::std::string const& name, ::ActorTextureInfo const& inInfo);
104
105 MCNAPI void mergeTexture(
106 ::std::string const& name,
107 ::ResourceLocation const& colorResourceLocation,
108 ::mce::TexturePtr colorTexture,
109 ::std::optional<::ResourceLocation> mersResourceLocation,
110 ::mce::TexturePtr mersTexture,
111 ::MERSTextureMode mersTextureMode,
112 ::std::optional<::ResourceLocation> normalResourceLocation,
113 ::mce::TexturePtr normalTexture,
114 ::NormalTextureMode normalTextureMode
115 );
116
117 MCNAPI void patch(
118 ::std::shared_ptr<::GeometryGroup> geometryGroup,
119 ::std::shared_ptr<::ActorAnimationGroup> animationGroup,
120 ::std::shared_ptr<::ActorAnimationControllerGroup> animationControllerGroup,
121 ::std::string const& jsonPatchInfo
122 );
123
124 MCNAPI void removeRenderController(::std::string const& controllerName);
125
126 MCNAPI void setColorTexture(
127 ::std::string const& name,
128 ::ResourceLocation const& resourceLocation,
129 ::mce::TexturePtr const& texture
130 );
131
133
134 MCNAPI void setSpawnEgg(::SpawnEggInfo spawnEgg);
135 // NOLINTEND
136
137public:
138 // static functions
139 // NOLINTBEGIN
140 MCAPI static ::ActorTextureInfo getActorTextureInfo(
141 ::std::shared_ptr<::ActorResourceDefinition> definition,
142 ::std::string_view name,
143 bool returnFirstIfNotFound
144 );
145
146 MCAPI static ::PBRTexturePtrs getActorTexturePtrs(
147 ::std::shared_ptr<::ActorResourceDefinition> definition,
148 ::std::string const& name,
149 bool returnFirstIfNotFound
150 );
151
152 MCAPI static ::mce::TexturePtr getColorTexture(
153 ::std::shared_ptr<::ActorResourceDefinition> definition,
154 ::std::string const& name,
155 bool returnFirstIfNotFound
156 );
157 // NOLINTEND
158
159public:
160 // constructor thunks
161 // NOLINTBEGIN
162 MCNAPI void* $ctor(::ActorResourceDefinition const& rhs);
163
164 MCNAPI void* $ctor(
165 ::HashedString name,
166 bool isAttachable,
167 ::SemVersion const& fullStackMinEngineVersion,
168 ::SemVersion const& actorJsonMinEngineVersion
169 );
170 // NOLINTEND
171};
Definition ActorAnimationControllerGroup.h:20
Definition ActorAnimationGroup.h:22
Definition ActorResourceDefinition.h:5
MCAPI void setColorTexture(::std::string const &name, ::ResourceLocation const &resourceLocation, ::mce::TexturePtr const &texture)
MCAPI ActorResourceDefinition(::HashedString name, bool isAttachable, ::SemVersion const &fullStackMinEngineVersion, ::SemVersion const &actorJsonMinEngineVersion)
MCAPI void setQueryableGeometryName(::HashedString name)
MCAPI void mergeParticleEffects(::std::unordered_map<::HashedString, ::HashedString > actorParticleEffects)
MCAPI void mergeScript(::std::string name, ::ExpressionNode expression)
MCAPI void patch(::std::shared_ptr<::GeometryGroup > geometryGroup, ::std::shared_ptr<::ActorAnimationGroup > animationGroup, ::std::shared_ptr<::ActorAnimationControllerGroup > animationControllerGroup, ::std::string const &jsonPatchInfo)
MCAPI void mergeSoundEffects(::std::string name, ::std::string soundEffectName)
MCAPI void removeRenderController(::std::string const &controllerName)
MCAPI void setSpawnEgg(::SpawnEggInfo spawnEgg)
MCAPI void mergeMaterial(::std::string const &name, ::mce::MaterialPtr skinningMaterialPtr, ::mce::MaterialPtr skinningColorMaterialPtr)
MCAPI void mergeRenderControllers(::std::vector<::std::pair<::RenderControllerPtr, ::ExpressionNode > > renderControllerPtrs)
MCAPI void * $ctor(::ActorResourceDefinition const &rhs)
MCAPI void mergeTexture(::std::string const &name, ::ActorTextureInfo const &inInfo)
MCAPI ActorResourceDefinition(::ActorResourceDefinition const &rhs)
MCAPI void mergeGeometry(::std::string const &name, ::GeometryPtr geometryPtr)
MCAPI void * $ctor(::HashedString name, bool isAttachable, ::SemVersion const &fullStackMinEngineVersion, ::SemVersion const &actorJsonMinEngineVersion)
MCAPI void mergeTexture(::std::string const &name, ::ResourceLocation const &colorResourceLocation, ::mce::TexturePtr colorTexture, ::std::optional<::ResourceLocation > mersResourceLocation, ::mce::TexturePtr mersTexture, ::MERSTextureMode mersTextureMode, ::std::optional<::ResourceLocation > normalResourceLocation, ::mce::TexturePtr normalTexture, ::NormalTextureMode normalTextureMode)
MCAPI void mergeHeldItemScale(::ExpressionNode heldItemScale)
Definition CommonResourceDefinitionMap.h:16
Definition ExpressionNode.h:35
Definition GeometryGroup.h:5
Definition GeometryPtr.h:5
Definition HashedString.h:5
Definition MaterialVariants.h:8
Definition RenderControllerPtr.h:5
Definition ResourceLocation.h:15
Definition SemVersion.h:15
Definition MaterialPtr.h:14
Definition TexturePtr.h:7
Definition ActorTextureInfo.h:5
Definition PBRTexturePtrs.h:5
Definition SpawnEggInfo.h:5