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 );
137
138 MCAPI void _renderGuiDataDrivenBlockItem(
139 ::BaseActorRenderContext& renderContext,
140 ::Block const* block,
141 float x,
142 float y,
143 float scale,
144 float const squeezeAmount,
145 int const zOrder
146 );
147
148 MCAPI bool _renderGuiEntityBlockItem(
149 ::BaseActorRenderContext& renderContext,
150 ::ItemRenderChunkType itemRenderChunkType,
151 ::dragon::RenderMetadata const renderMetadata,
152 ::ItemStack const& item,
153 float x,
154 float y,
155 float lightMultiplier,
156 float scale
157 );
158
159 MCAPI void _renderItemGroup(
160 ::BaseActorRenderContext& renderContext,
161 ::ItemActor& itemEntity,
162 int itemCount,
163 float scaleValue,
164 float frameAlpha,
165 bool const useMatrixAsIs
166 ) const;
167
168 MCAPI void forceGraphicsLoad();
169
170 MCAPI ::ItemGraphics& getGraphics(::ItemStack const& item);
171
172 MCAPI void iconBlit(
173 ::BaseActorRenderContext& renderContext,
174 ::mce::TexturePtr const& texture,
175 float x,
176 float y,
177 float z,
178 ::TextureUVCoordinateSet const& iconTextureCoord,
179 float w,
180 float h,
181 float lightMultiplier,
182 float alphaMultiplier,
183 int colorMultiplier,
184 int secondaryColorMultiplier,
185 float xscale,
186 float yscale,
187 ::IconBlitGlint const iconBlitGlint,
188 bool const useMultiColorTextureTinting
189 );
190
191 MCAPI void renderGuiItemInChunk(
192 ::BaseActorRenderContext& renderContext,
193 ::ItemRenderChunkType itemRenderChunkType,
194 ::ItemStack const& item,
195 float x,
196 float y,
197 float lightMultiplier,
198 float alphaMultiplier,
199 float scale,
200 int frame,
201 bool allowAnimation,
202 int zOrder,
203 ::std::optional<::TextureUVCoordinateSet> const& customIconUVCoords
204 );
205
206 MCAPI void renderGuiItemNew(
207 ::BaseActorRenderContext& renderContext,
208 ::ItemStack const& item,
209 int frame,
210 float x,
211 float y,
212 bool renderEnchantmentFoil,
213 float transparency,
214 float lightMultiplier,
215 float scale,
216 int zOrder
217 );
218 // NOLINTEND
219
220public:
221 // static functions
222 // NOLINTBEGIN
223 MCAPI static void _getGuiItemColors(::ItemStack const& item, int& color, int& secondaryColor);
224
225 MCAPI static void _renderShieldItem(
226 ::BaseActorRenderContext& renderContext,
227 ::ItemStack const& item,
228 ::ItemActor& itemEntity,
229 float actorFrameAlpha
230 );
231
232 MCAPI static float getRenderYOffset(::ItemActor const& itemEntity, ::BlockType const* block, float ageInSeconds);
233 // NOLINTEND
234
235public:
236 // constructor thunks
237 // NOLINTBEGIN
238 MCAPI void* $ctor(::std::shared_ptr<::mce::TextureGroup> textureGroup, bool supportsNewVertexFormat);
239 // NOLINTEND
240
241public:
242 // virtual function thunks
243 // NOLINTBEGIN
244 MCAPI void $render(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
245 // NOLINTEND
246};
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:42
Definition ConduitBlockActor.h:20
Definition DecoratedPotBlockActor.h:23
Definition ItemActor.h:30
Definition ItemGraphics.h:5
Definition ItemRenderer.h:5
Definition ItemStack.h:24
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