LeviLamina
Loading...
Searching...
No Matches
ItemRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/actor/ActorRenderer.h"
7#include "mc/client/renderer/actor/IconBlitGlint.h"
8#include "mc/client/renderer/actor/ItemRenderChunkType.h"
9#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
10#include "mc/world/level/block/BlockShape.h"
11
12// auto generated forward declare list
13// clang-format off
14class ActorRenderData;
17class Block;
18class BlockGraphics;
20class BlockType;
23class ItemActor;
24class ItemGraphics;
25class ItemStack;
27class SkullBlockActor;
29namespace dragon { struct RenderMetadata; }
30namespace mce { class TextureGroup; }
31namespace mce { class TexturePtr; }
32// clang-format on
33
34class ItemRenderer : public ::ActorRenderer {
35public:
36 // ItemRenderer inner types declare
37 // clang-format off
40 // clang-format on
41
42 // ItemRenderer inner types define
43 struct GuiItemPopTransform {
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::UntypedStorage<4, 12> mUnkcd7850;
48 ::ll::UntypedStorage<4, 4> mUnkf1067b;
49 ::ll::UntypedStorage<4, 4> mUnk5e0da4;
50 // NOLINTEND
51
52 public:
53 // prevent constructor by default
54 GuiItemPopTransform& operator=(GuiItemPopTransform const&);
55 GuiItemPopTransform(GuiItemPopTransform const&);
56 GuiItemPopTransform();
57 };
58
60
61public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTessellator>> mBlockTessellator;
65 ::ll::TypedStorage<4, 64, float[16]> mRandomFloats;
66 ::ll::TypedStorage<8, 64, ::std::unordered_map<short, ::ItemGraphics>> mItemGraphics;
67 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIBlitMaterial;
68 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitMaterial;
69 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitMaterialMultiColorTint;
70 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconUnblitMaterial;
71 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitGlintMaterial;
72 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestChangeColorMaterial;
73 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestChangeColorGlintMaterial;
74 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestMultiColorTintMaterial;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BannerBlockActor>> mBannerEntity;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DecoratedPotBlockActor>> mDecoratedPotBlockEntity;
77 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SkullBlockActor>> mSkullEntity;
78 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConduitBlockActor>> mConduitEntity;
79 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ShulkerBoxBlockActor>> mShulkerBoxEntity;
80 ::ll::TypedStorage<1, 1, bool> mSupportsNewVertexFormat;
81 // NOLINTEND
82
83public:
84 // prevent constructor by default
85 ItemRenderer();
86
87public:
88 // virtual functions
89 // NOLINTBEGIN
90 virtual ~ItemRenderer() /*override*/ = default;
91
92 virtual void render(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData) /*override*/;
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCAPI ItemRenderer(::std::shared_ptr<::mce::TextureGroup> textureGroup, bool supportsNewVertexFormat);
99
100 MCAPI void _renderBannerItem(
101 ::BaseActorRenderContext& renderContext,
102 ::ItemStack const& item,
103 ::ItemActor& itemEntity,
104 bool isItem,
105 float actorFrameAlpha
106 );
107
108 MCAPI void _renderBlockItem(
109 ::BaseActorRenderContext& renderContext,
110 ::ItemStack const& item,
111 ::ItemActor& itemEntity,
112 ::BlockType const* blockType,
113 ::BlockShape const shape,
114 float actorFrameAlpha,
115 int count
116 );
117
118 MCAPI void _renderDecoratedPotItem(
119 ::BaseActorRenderContext& renderContext,
120 ::ItemStack const& item,
121 ::ItemActor& itemEntity,
122 bool isItem
123 );
124
125 MCAPI void _renderGuiBlockTypeItem(
126 ::BaseActorRenderContext& renderContext,
127 ::ItemStack const& item,
128 ::BlockGraphics const* blockGraphics,
129 ::mce::TexturePtr const& texture,
130 float x,
131 float y,
132 float lightMultiplier,
133 float alphaMultiplier,
134 float scale,
135 float const pickupPopPercentage,
136 int const zOrder
137 );
138
139 MCAPI void _renderGuiDataDrivenBlockItem(
140 ::BaseActorRenderContext& renderContext,
141 ::Block const* block,
142 float x,
143 float y,
144 float scale,
145 float const squeezeAmount,
146 int const zOrder
147 );
148
149 MCAPI bool _renderGuiEntityBlockItem(
150 ::BaseActorRenderContext& renderContext,
151 ::ItemRenderChunkType itemRenderChunkType,
152 ::dragon::RenderMetadata const renderMetadata,
153 ::ItemStack const& item,
154 float x,
155 float y,
156 float lightMultiplier,
157 float scale
158 );
159
160 MCAPI void _renderItemGroup(
161 ::BaseActorRenderContext& renderContext,
162 ::ItemActor& itemEntity,
163 int itemCount,
164 float scaleValue,
165 float frameAlpha,
166 bool const useMatrixAsIs
167 ) const;
168
169 MCAPI void forceGraphicsLoad();
170
171 MCAPI ::ItemGraphics& getGraphics(::ItemStack const& item);
172
173 MCAPI void iconBlit(
174 ::BaseActorRenderContext& renderContext,
175 ::mce::TexturePtr const& texture,
176 float x,
177 float y,
178 float z,
179 ::TextureUVCoordinateSet const& iconTextureCoord,
180 float w,
181 float h,
182 float lightMultiplier,
183 float alphaMultiplier,
184 int colorMultiplier,
185 int secondaryColorMultiplier,
186 float xscale,
187 float yscale,
188 ::IconBlitGlint const iconBlitGlint,
189 bool const useMultiColorTextureTinting
190 );
191
192 MCAPI void renderGuiItemInChunk(
193 ::BaseActorRenderContext& renderContext,
194 ::ItemRenderChunkType itemRenderChunkType,
195 ::ItemStack const& item,
196 float x,
197 float y,
198 float lightMultiplier,
199 float alphaMultiplier,
200 float scale,
201 int frame,
202 bool allowAnimation,
203 int zOrder,
204 ::std::optional<::TextureUVCoordinateSet> const& customIconUVCoords
205 );
206
207 MCAPI void renderGuiItemNew(
208 ::BaseActorRenderContext& renderContext,
209 ::ItemStack const& item,
210 int frame,
211 float x,
212 float y,
213 bool renderEnchantmentFoil,
214 float transparency,
215 float lightMultiplier,
216 float scale,
217 int zOrder
218 );
219 // NOLINTEND
220
221public:
222 // static functions
223 // NOLINTBEGIN
224 MCAPI static void _getGuiItemColors(::ItemStack const& item, int& color, int& secondaryColor);
225
226 MCAPI static void _renderShieldItem(
227 ::BaseActorRenderContext& renderContext,
228 ::ItemStack const& item,
229 ::ItemActor& itemEntity,
230 float actorFrameAlpha
231 );
232
233 MCAPI static float getRenderYOffset(::ItemActor const& itemEntity, ::BlockType const* block, float ageInSeconds);
234 // NOLINTEND
235
236public:
237 // constructor thunks
238 // NOLINTBEGIN
239 MCAPI void* $ctor(::std::shared_ptr<::mce::TextureGroup> textureGroup, bool supportsNewVertexFormat);
240 // NOLINTEND
241
242public:
243 // virtual function thunks
244 // NOLINTBEGIN
245 MCAPI void $render(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
246 // NOLINTEND
247};
Definition ActorRenderData.h:5
Definition ActorRenderer.h:5
Definition BannerBlockActor.h:21
Definition BaseActorRenderContext.h:5
Definition BlockGraphics.h:5
Definition BlockTessellator.h:5
Definition BlockType.h:79
Definition Block.h:41
Definition ConduitBlockActor.h:20
Definition DecoratedPotBlockActor.h:23
Definition ItemActor.h:30
Definition ItemGraphics.h:5
Definition ItemRenderer.h:5
Definition ItemStack.h:26
Definition ShulkerBoxBlockActor.h:24
Definition SkullBlockActor.h:19
Definition TextureGroup.h:7
Definition TexturePtr.h:7
Definition ItemRenderer.h:16
Definition ItemRenderer.h:14
Definition TextureUVCoordinateSet.h:5
Definition RenderMetadata.h:7