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/MinecraftUICustomRenderer.h"
8#include "mc/client/gui/screens/UIBatchType.h"
9#include "mc/client/renderer/ActorShaderManager.h"
10#include "mc/client/renderer/actor/ItemRenderChunkType.h"
11#include "mc/client/renderer/texture/TextureUVCoordinateSet.h"
12#include "mc/common/WeakPtr.h"
13#include "mc/deps/core/resource/ResourceFileSystem.h"
14#include "mc/world/item/ItemStack.h"
15
16// auto generated forward declare list
17// clang-format off
18class IClientInstance;
19class Item;
20class ItemRegistryRef;
23class UIControl;
25class UIScene;
26struct UIItemRenderInfo;
27// clang-format on
28
30public:
31 // InventoryItemRenderer inner types declare
32 // clang-format off
33 class CachedProperties;
34 // clang-format on
35
36 // InventoryItemRenderer inner types define
37 class CachedProperties {
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<4, 4, int> mCacheVersion;
42 ::ll::TypedStorage<4, 4, int> mItemIdAux;
43 ::ll::TypedStorage<4, 4, int> mChargedItem;
44 ::ll::TypedStorage<4, 4, int> mCustomColor;
45 ::ll::TypedStorage<1, 1, bool> mIsFiltered;
46 ::ll::TypedStorage<8, 8, int64> mRawPickUpTime;
47 ::ll::TypedStorage<1, 1, bool> mIsShowPickup;
48 // NOLINTEND
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<4, 4, int> mCustomId;
55 ::ll::TypedStorage<4, 4, int> mItemId;
56 ::ll::TypedStorage<4, 4, int> mAuxVal;
57 ::ll::TypedStorage<4, 4, int> mCustomColor;
58 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mPickupTime;
59 ::ll::TypedStorage<1, 1, bool> mIsShowPickup;
60 ::ll::TypedStorage<1, 1, bool> mIsFiltered;
61 ::ll::TypedStorage<4, 4, int> mAnimationFrame;
62 ::ll::TypedStorage<1, 1, bool> mIsEnchanted;
63 ::ll::TypedStorage<1, 1, bool> mHidingIcon;
64 ::ll::TypedStorage<4, 8, ::glm::vec2> mPosition;
65 ::ll::TypedStorage<8, 32, ::std::string> mTextureName;
66 ::ll::TypedStorage<4, 4, ::UIMaterialType> mUIMaterialType;
67 ::ll::TypedStorage<4, 4, ::ResourceFileSystem> mTextureFileSystem;
68 ::ll::TypedStorage<8, 88, ::TextureUVCoordinateSet> mIcon;
69 ::ll::TypedStorage<8, 8, ::WeakPtr<::Item>> mItem;
70 ::ll::TypedStorage<8, 152, ::ItemStack> mItemInstance;
71 ::ll::TypedStorage<4, 4, ::ItemRenderChunkType> mItemRenderType;
72 ::ll::TypedStorage<8, 40, ::InventoryItemRenderer::CachedProperties> mCachedProperties;
73 // NOLINTEND
74
75public:
76 // virtual functions
77 // NOLINTBEGIN
78 virtual ~InventoryItemRenderer() /*override*/;
79
80 virtual ::std::shared_ptr<::UICustomRenderer> clone() const /*override*/;
81
82 virtual void preRenderSetup(::MinecraftUIRenderContext& renderContext) /*override*/;
83
84 virtual bool update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&) /*override*/;
85
86 virtual void render(
87 ::MinecraftUIRenderContext& renderContext,
88 ::IClientInstance& client,
89 ::UIControl& owner,
90 int pass
91 ) /*override*/;
92
93 virtual ::UIBatchType getBatchType() const /*override*/;
94
95 virtual int getCustomId() const /*override*/;
96
97 virtual int getNumRenderPasses() const /*override*/;
98
99 virtual ::UIMaterialType getUIMaterialType(int pass) const /*override*/;
100
101 virtual ::ResourceLocation getResourceLocation(int textureSlot, int pass) const /*override*/;
102
103 virtual bool getRequiresPreRenderSetup(int pass) const /*override*/;
104
105 virtual ::UIItemRenderInfo getItemRenderInfo() const /*override*/;
106 // NOLINTEND
107
108public:
109 // member functions
110 // NOLINTBEGIN
111 MCAPI InventoryItemRenderer();
112
113 MCAPI void _onItemChanged(::ItemRegistryRef itemRegistry, int itemId, int newAuxVal);
114
115 MCAPI void _updateCachedProperties(::UIControl const& owner);
116 // NOLINTEND
117
118public:
119 // static functions
120 // NOLINTBEGIN
121 MCAPI static ::UIItemRenderInfo getItemRenderInfo(::ItemStack const& item);
122
123 MCAPI static ::ItemRenderChunkType getRenderTypeFromItem(::ItemStack const& item);
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void* $ctor();
130 // NOLINTEND
131
132public:
133 // destructor thunk
134 // NOLINTBEGIN
135 MCAPI void $dtor();
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141 MCAPI ::std::shared_ptr<::UICustomRenderer> $clone() const;
142
143 MCAPI void $preRenderSetup(::MinecraftUIRenderContext& renderContext);
144
145 MCAPI bool $update(::IClientInstance& client, ::UIControl& owner, ::UIScene const&);
146
147 MCAPI void
148 $render(::MinecraftUIRenderContext& renderContext, ::IClientInstance& client, ::UIControl& owner, int pass);
149
150 MCAPI ::UIBatchType $getBatchType() const;
151
152 MCFOLD int $getCustomId() const;
153
154 MCAPI int $getNumRenderPasses() const;
155
156 MCAPI ::UIMaterialType $getUIMaterialType(int pass) const;
157
158 MCAPI ::ResourceLocation $getResourceLocation(int textureSlot, int pass) const;
159
160 MCFOLD bool $getRequiresPreRenderSetup(int pass) const;
161
162 MCAPI ::UIItemRenderInfo $getItemRenderInfo() const;
163 // NOLINTEND
164
165public:
166 // vftables
167 // NOLINTBEGIN
169
170 MCNAPI static void** $vftableForActorShaderManager();
171 // NOLINTEND
172};
Definition ActorShaderManager.h:5
Definition IClientInstance.h:5
Definition InventoryItemRenderer.h:13
Definition InventoryItemRenderer.h:5
static MCAPI void ** $vftableForMinecraftUICustomRenderer()
static MCAPI void ** $vftableForActorShaderManager()
Definition ItemRegistryRef.h:36
Definition Item.h:68
Definition MinecraftUICustomRenderer.h:5
Definition MinecraftUIRenderContext.h:5
Definition ResourceLocation.h:15
Definition UIControl.h:5
Definition UICustomRenderer.h:5
Definition UIScene.h:5
Definition UIItemRenderInfo.h:5