LeviLamina
Loading...
Searching...
No Matches
DataDrivenModel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/model/models/Model.h"
7#include "mc/deps/core/string/HashedString.h"
8#include "mc/world/actor/animation/AttachableSlotIndex.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class ActorRenderData;
16class ExpressionNode;
17class GameVersion;
18class ItemStack;
19class RenderParams;
20class Vec3;
21// clang-format on
22
23class DataDrivenModel : public ::Model {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ActorResourceDefinition>> mResourceDefinition;
28 ::ll::TypedStorage<8, 48, ::HashedString> mName;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::weak_ptr<::DataDrivenRenderer>>> mItemToRendererMap;
30 ::ll::TypedStorage<1, 1, bool> mEnableAttachables;
31 ::ll::TypedStorage<1, 1, bool> mHideArmor;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 DataDrivenModel();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~DataDrivenModel() /*override*/ = default;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI explicit DataDrivenModel(::std::weak_ptr<::ActorResourceDefinition> definitionWeakPtr);
48
49 MCAPI bool _setArmorTrim(
50 ::ItemStack const& itemInstance,
51 ::std::shared_ptr<::DataDrivenModel> model,
52 ::Actor& actor,
53 ::RenderParams& renderParams,
54 ::RenderParams& childRenderParams
55 );
56
57 MCAPI ::ExpressionNode getCopyOfScript_defaultIfNone(::HashedString const& name) const;
58
59 MCAPI ::std::weak_ptr<::DataDrivenRenderer>
60 getDataDrivenRenderer(::RenderParams& renderParams, ::ItemStack const& itemInstance);
61
62 MCAPI ::std::string getResourceDefinitionName() const;
63
64 MCAPI bool hasScript(::HashedString const& name) const;
65
66 MCAPI void render(
67 ::std::shared_ptr<::DataDrivenRenderer> renderer,
68 ::ActorRenderData& actorRenderData,
69 ::Vec3 const& modelTranslationWithWorldRotation,
70 ::Vec3 const& cameraTargetPos
71 );
72
73 MCAPI void renderAttachable(
74 ::ItemStack const& itemInstance,
75 ::AttachableSlotIndex const& attachableSlotIndex,
76 ::RenderParams& renderParams,
77 ::Actor& actor
78 );
79
80 MCAPI void renderAttachableNoChecks(
81 ::ItemStack const& itemInstance,
82 ::AttachableSlotIndex const& attachableSlotIndex,
83 ::RenderParams& renderParams,
84 ::Actor& actor
85 );
86
87 MCAPI void resolveHeldItemScaleForRender(::RenderParams& renderParams) const;
88
89 MCAPI void setupAttachable(
90 ::ItemStack const& itemInstance,
91 ::AttachableSlotIndex const& attachableSlotIndex,
92 ::RenderParams& renderParams,
93 ::Actor& actor
94 );
95
96 MCAPI void setupAttachableNoChecks(
97 ::ItemStack const& itemInstance,
98 ::AttachableSlotIndex const& attachableSlotIndex,
99 ::RenderParams& renderParams,
100 ::Actor& actor,
101 bool isFirstPerson,
102 bool runParentSetup
103 );
104
105 MCAPI bool tryExecuteScript(::HashedString const& scriptName, ::RenderParams& renderParams, float& result);
106 // NOLINTEND
107
108public:
109 // static functions
110 // NOLINTBEGIN
111 MCAPI static bool shouldRenderAttachableOnActor(
112 ::ItemStack const& itemInstance,
113 ::AttachableSlotIndex const& attachableSlotIndex,
114 bool isSpectator,
115 bool isFirstPerson,
116 bool isRenderingOnMap,
117 bool lessThanOrEqualToVersion_1_16_210,
118 bool hideArmor
119 );
120 // NOLINTEND
121
122public:
123 // static variables
124 // NOLINTBEGIN
125 MCAPI static ::GameVersion& Version_1_16_210();
126 // NOLINTEND
127
128public:
129 // constructor thunks
130 // NOLINTBEGIN
131 MCAPI void* $ctor(::std::weak_ptr<::ActorResourceDefinition> definitionWeakPtr);
132 // NOLINTEND
133};
Definition ActorRenderData.h:5
Definition ActorResourceDefinition.h:5
Definition Actor.h:114
Definition DataDrivenModel.h:5
Definition DataDrivenRenderer.h:5
Definition ExpressionNode.h:35
Definition GameVersion.h:10
Definition ItemStack.h:24
Definition Model.h:5
Definition RenderParams.h:29
Definition Vec3.h:10