LeviLamina
Loading...
Searching...
No Matches
InventoryItemRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/UIMaterialType.h"
7#include "mc/client/gui/controls/renderers/InventoryItemRenderItemData.h"
8#include "mc/client/gui/controls/renderers/MinecraftUICustomRenderer.h"
9#include "mc/client/gui/screens/UIBatchType.h"
10#include "mc/client/renderer/ActorShaderManager.h"
11#include "mc/client/renderer/actor/ItemRenderChunkType.h"
12#include "mc/platform/brstd/function_ref.h"
13
14// auto generated forward declare list
15// clang-format off
16class IClientInstance;
18class ItemRegistryRef;
19class ItemStack;
21class PropertyBag;
23class UIControl;
25class UIScene;
27struct UIItemRenderInfo;
28// clang-format on
29
33public:
34 // InventoryItemRenderer inner types declare
35 // clang-format off
36 struct UpdateData;
37 class CachedProperties;
38 // clang-format on
39
40 // InventoryItemRenderer inner types define
41 struct UpdateData {
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<4, 8, ::glm::vec2> mOwnerPosition;
46 ::ll::TypedStorage<8, 8, ::PropertyBag const*> mOwnerPropertyBag;
47 ::ll::TypedStorage<8, 8, ::ItemRegistryRef const&> mItemRegistry;
48 ::ll::TypedStorage<
49 8,
50 16,
51 ::brstd::function_ref<
52 ::std::optional<int>(bool, ::ItemStack const&) const,
53 ::std::optional<int>(bool, ::ItemStack const&)>>
54 mGetAnimationFrame;
55 // NOLINTEND
56
57 public:
58 // prevent constructor by default
59 UpdateData& operator=(UpdateData const&);
60 UpdateData(UpdateData const&);
61 UpdateData();
62 };
63
64 class CachedProperties {
65 public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<4, 4, int> mCacheVersion;
69 ::ll::TypedStorage<4, 4, int> mItemIdAux;
70 ::ll::TypedStorage<4, 4, int> mChargedItem;
71 ::ll::TypedStorage<4, 4, int> mCustomColor;
72 ::ll::TypedStorage<1, 1, bool> mIsFiltered;
73 ::ll::TypedStorage<8, 8, int64> mRawPickUpTime;
74 ::ll::TypedStorage<1, 1, bool> mIsShowPickup;
75 // NOLINTEND
76 };
77
78public:
79 // member variables
80 // NOLINTBEGIN
81 ::ll::TypedStorage<8, 40, ::InventoryItemRenderer::CachedProperties> mCachedProperties;
82 // NOLINTEND
83
84public:
85 // virtual functions
86 // NOLINTBEGIN
87 virtual ~InventoryItemRenderer() /*override*/ = default;
88
89 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
90
91 virtual void preRenderSetup(::MinecraftUIRenderContext& renderContext) /*override*/;
92
93 virtual bool update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&) /*override*/;
94
95 virtual void render(
96 ::MinecraftUIRenderContext& renderContext,
97 ::IClientInstance& client,
98 ::UIControl& owner,
99 int pass
100 ) /*override*/;
101
102 virtual ::UIBatchType getBatchType() const /*override*/;
103
104 virtual int getCustomId() const /*override*/;
105
106 virtual int getNumRenderPasses() const /*override*/;
107
108 virtual ::UIMaterialType getUIMaterialType(int pass) const /*override*/;
109
110 virtual ::ResourceLocation getResourceLocation(int textureSlot, int pass) const /*override*/;
111
112 virtual bool getRequiresPreRenderSetup(int pass) const /*override*/;
113
114 virtual ::UIItemRenderInfo getItemRenderInfo() const /*override*/;
115 // NOLINTEND
116
117public:
118 // member functions
119 // NOLINTBEGIN
120 MCAPI void _render(
121 ::IInventoryItemRendererRenderContext& renderContext,
122 ::InventoryItemRenderOwnerData const& owner,
123 int pass
124 );
125
126 MCAPI bool _update(::InventoryItemRenderer::UpdateData const& data);
127 // NOLINTEND
128
129public:
130 // static functions
131 // NOLINTBEGIN
132 MCAPI static ::UIItemRenderInfo getItemRenderInfo(::ItemStack const& item);
133
134 MCAPI static ::ItemRenderChunkType getRenderTypeFromItem(::ItemStack const& item);
135 // NOLINTEND
136
137public:
138 // virtual function thunks
139 // NOLINTBEGIN
140 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
141
142 MCAPI void $preRenderSetup(::MinecraftUIRenderContext& renderContext);
143
144 MCAPI bool $update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&);
145
146 MCAPI void
147 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int pass);
148
149 MCAPI ::UIBatchType $getBatchType() const;
150
151 MCFOLD int $getCustomId() const;
152
153 MCAPI int $getNumRenderPasses() const;
154
155 MCAPI ::UIMaterialType $getUIMaterialType(int pass) const;
156
157 MCAPI ::ResourceLocation $getResourceLocation(int textureSlot, int pass) const;
158
159 MCFOLD bool $getRequiresPreRenderSetup(int pass) const;
160
161 MCAPI ::UIItemRenderInfo $getItemRenderInfo() const;
162 // NOLINTEND
163
164public:
165 // vftables
166 // NOLINTBEGIN
168
169 MCNAPI static void** $vftableForActorShaderManager();
170 // NOLINTEND
171};
Definition ActorShaderManager.h:5
Definition IClientInstance.h:5
Definition IInventoryItemRendererRenderContext.h:5
Definition InventoryItemRenderer.h:16
Definition InventoryItemRenderer.h:5
static MCAPI void ** $vftableForMinecraftUICustomRenderer()
static MCAPI void ** $vftableForActorShaderManager()
Definition ItemRegistryRef.h:41
Definition ItemStack.h:26
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition PropertyBag.h:8
Definition ResourceLocation.h:15
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIScene.h:5
Definition InventoryItemRenderItemData.h:5
Definition InventoryItemRenderOwnerData.h:5
Definition InventoryItemRenderer.h:14
Definition UIItemRenderInfo.h:5