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*/;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI explicit DataDrivenModel(::std::weak_ptr<::ActorResourceDefinition> definitionWeakPtr);
48
49 MCAPI ::HashedString _parseRootSkinName(::HashedString const& skinName);
50
51 MCAPI bool _setArmorTrim(
52 ::ItemStack const& itemInstance,
53 ::std::shared_ptr<::DataDrivenModel> model,
54 ::Actor& actor,
55 ::RenderParams& renderParams,
56 ::RenderParams& childRenderParams
57 );
58
59 MCAPI float
60 executeScript(::HashedString const& scriptName, ::RenderParams& renderParams, float defaultValueIfNoScript);
61
62 MCAPI ::ExpressionNode getCopyOfScript_defaultIfNone(::HashedString const& name) const;
63
64 MCAPI ::std::weak_ptr<::DataDrivenRenderer>
65 getDataDrivenRenderer(::RenderParams& renderParams, ::ItemStack const& itemInstance);
66
67 MCAPI ::std::string getResourceDefinitionName() const;
68
69 MCAPI bool hasScript(::HashedString const& name) const;
70
71 MCAPI void render(
72 ::std::shared_ptr<::DataDrivenRenderer> renderer,
73 ::ActorRenderData& actorRenderData,
74 ::Vec3 const& modelTranslationWithWorldRotation,
75 ::Vec3 const& cameraTargetPos
76 );
77
78 MCAPI void renderAsChild(::RenderParams& renderParams, ::AttachableSlotIndex const& index);
79
80 MCAPI void renderAttachable(
81 ::ItemStack const& itemInstance,
82 ::AttachableSlotIndex const& attachableSlotIndex,
83 ::RenderParams& renderParams,
84 ::Actor& actor
85 );
86
87 MCAPI void renderAttachableNoChecks(
88 ::ItemStack const& itemInstance,
89 ::AttachableSlotIndex const& attachableSlotIndex,
90 ::RenderParams& renderParams,
91 ::Actor& actor
92 );
93
94 MCAPI void setupAttachable(
95 ::ItemStack const& itemInstance,
96 ::AttachableSlotIndex const& attachableSlotIndex,
97 ::RenderParams& renderParams,
98 ::Actor& actor
99 );
100
101 MCAPI void setupAttachableNoChecks(
102 ::ItemStack const& itemInstance,
103 ::AttachableSlotIndex const& attachableSlotIndex,
104 ::RenderParams& renderParams,
105 ::Actor& actor,
106 bool isFirstPerson,
107 bool runParentSetup
108 );
109
110 MCAPI bool tryExecuteScript(::HashedString const& scriptName, ::RenderParams& renderParams, float& result);
111 // NOLINTEND
112
113public:
114 // static functions
115 // NOLINTBEGIN
116 MCAPI static bool shouldRenderAttachableOnActor(
117 ::ItemStack const& itemInstance,
118 ::AttachableSlotIndex const& attachableSlotIndex,
119 bool isSpectator,
120 bool isFirstPerson,
121 bool isRenderingOnMap,
122 bool lessThanOrEqualToVersion_1_16_210,
123 bool hideArmor
124 );
125 // NOLINTEND
126
127public:
128 // static variables
129 // NOLINTBEGIN
130 MCAPI static ::GameVersion& Version_1_16_210();
131 // NOLINTEND
132
133public:
134 // constructor thunks
135 // NOLINTBEGIN
136 MCAPI void* $ctor(::std::weak_ptr<::ActorResourceDefinition> definitionWeakPtr);
137 // NOLINTEND
138
139public:
140 // destructor thunk
141 // NOLINTBEGIN
142 MCAPI void $dtor();
143 // NOLINTEND
144
145public:
146 // vftables
147 // NOLINTBEGIN
148 MCNAPI static void** $vftable();
149 // NOLINTEND
150};
Definition ActorRenderData.h:5
Definition ActorResourceDefinition.h:5
Definition Actor.h:125
Definition DataDrivenModel.h:5
static MCAPI void ** $vftable()
Definition DataDrivenRenderer.h:5
Definition ExpressionNode.h:36
Definition GameVersion.h:10
Definition ItemStack.h:35
Definition Model.h:5
Definition RenderParams.h:30
Definition Vec3.h:10