Skip to content
LeviMC
English
AutoLightDark
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
11// auto generated forward declare list
12// clang-format off
13class ActorRenderData;
16class Block;
17class BlockGraphics;
21class ItemActor;
22class ItemGraphics;
23class ItemStack;
25class SkullBlockActor;
27namespace mce { class TextureGroup; }
28namespace mce { class TexturePtr; }
29// clang-format on
30
31class ItemRenderer : public ::ActorRenderer {
32public:
33 // ItemRenderer inner types declare
34 // clang-format off
37 // clang-format on
38
39 // ItemRenderer inner types define
40 struct GuiItemPopTransform {
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::UntypedStorage<4, 12> mUnkcd7850;
45 ::ll::UntypedStorage<4, 4> mUnkf1067b;
46 ::ll::UntypedStorage<4, 4> mUnk5e0da4;
47 // NOLINTEND
48
49 public:
50 // prevent constructor by default
51 GuiItemPopTransform& operator=(GuiItemPopTransform const&);
52 GuiItemPopTransform(GuiItemPopTransform const&);
53 GuiItemPopTransform();
54 };
55
57
58public:
59 // member variables
60 // NOLINTBEGIN
61 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockTessellator>> mBlockTessellator;
62 ::ll::TypedStorage<4, 64, float[16]> mRandomFloats;
63 ::ll::TypedStorage<8, 64, ::std::unordered_map<short, ::ItemGraphics>> mItemGraphics;
64 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIBlitMaterial;
65 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitMaterial;
66 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitMaterialMultiColorTint;
67 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconUnblitMaterial;
68 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mUIIconBlitGlintMaterial;
69 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestChangeColorMaterial;
70 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestChangeColorGlintMaterial;
71 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mEntityAlphatestMultiColorTintMaterial;
72 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BannerBlockActor>> mBannerEntity;
73 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DecoratedPotBlockActor>> mDecoratedPotBlockEntity;
74 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SkullBlockActor>> mSkullEntity;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConduitBlockActor>> mConduitEntity;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ShulkerBoxBlockActor>> mShulkerBoxEntity;
77 ::ll::TypedStorage<1, 1, bool> mSupportsNewVertexFormat;
78 // NOLINTEND
79
80public:
81 // prevent constructor by default
82 ItemRenderer();
83
84public:
85 // virtual functions
86 // NOLINTBEGIN
87 virtual ~ItemRenderer() /*override*/ = default;
88
89 virtual void render(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData) /*override*/;
90 // NOLINTEND
91
92public:
93 // member functions
94 // NOLINTBEGIN
95 MCNAPI ItemRenderer(::std::shared_ptr<::mce::TextureGroup> textureGroup, bool supportsNewVertexFormat);
96
97 MCNAPI void _renderBannerItem(
98 ::BaseActorRenderContext& renderContext,
99 ::ItemStack const& item,
100 ::ItemActor& itemEntity,
101 bool isItem,
102 float actorFrameAlpha
103 );
104
106 ::BaseActorRenderContext& renderContext,
107 ::ItemStack const& item,
108 ::ItemActor& itemEntity,
109 bool isItem
110 );
111
113 ::BaseActorRenderContext& renderContext,
114 ::ItemStack const& item,
115 ::BlockGraphics const* blockGraphics,
116 ::mce::TexturePtr const& texture,
117 float x,
118 float y,
119 float lightMultiplier,
120 float alphaMultiplier,
121 float scale,
122 float const pickupPopPercentage,
123 int const zOrder
124 );
125
127 ::BaseActorRenderContext& renderContext,
128 ::Block const* block,
129 float x,
130 float y,
131 float scale,
132 float const squeezeAmount,
133 int const zOrder
134 );
135
136 MCNAPI void _renderItemGroup(
137 ::BaseActorRenderContext& renderContext,
138 ::ItemActor& itemEntity,
139 int itemCount,
140 float scaleValue,
141 float frameAlpha,
142 bool const useMatrixAsIs
143 ) const;
144
145 MCNAPI void forceGraphicsLoad();
146
147 MCNAPI ::ItemGraphics& getGraphics(::ItemStack const& item);
148
149 MCAPI void iconBlit(
150 ::BaseActorRenderContext& renderContext,
151 ::mce::TexturePtr const& texture,
152 float x,
153 float y,
154 float z,
155 ::TextureUVCoordinateSet const& iconTextureCoord,
156 float w,
157 float h,
158 float lightMultiplier,
159 float alphaMultiplier,
160 int colorMultiplier,
161 int secondaryColorMultiplier,
162 float xscale,
163 float yscale,
164 ::IconBlitGlint const iconBlitGlint,
165 bool const useMultiColorTextureTinting
166 );
167
168 MCAPI void renderGuiItemInChunk(
169 ::BaseActorRenderContext& renderContext,
170 ::ItemRenderChunkType itemRenderChunkType,
171 ::ItemStack const& item,
172 float x,
173 float y,
174 float lightMultiplier,
175 float alphaMultiplier,
176 float scale,
177 int frame,
178 bool allowAnimation,
179 int zOrder,
180 ::std::optional<::TextureUVCoordinateSet> const& customIconUVCoords
181 );
182
183 MCAPI void renderGuiItemNew(
184 ::BaseActorRenderContext& renderContext,
185 ::ItemStack const& item,
186 int frame,
187 float x,
188 float y,
189 bool renderEnchantmentFoil,
190 float transparency,
191 float lightMultiplier,
192 float scale,
193 int zOrder
194 );
195 // NOLINTEND
196
197public:
198 // static functions
199 // NOLINTBEGIN
200 MCNAPI static void _renderShieldItem(
201 ::BaseActorRenderContext& renderContext,
202 ::ItemStack const& item,
203 ::ItemActor& itemEntity,
204 float actorFrameAlpha
205 );
206 // NOLINTEND
207
208public:
209 // constructor thunks
210 // NOLINTBEGIN
211 MCNAPI void* $ctor(::std::shared_ptr<::mce::TextureGroup> textureGroup, bool supportsNewVertexFormat);
212 // NOLINTEND
213
214public:
215 // virtual function thunks
216 // NOLINTBEGIN
217 MCAPI void $render(::BaseActorRenderContext& renderContext, ::ActorRenderData& entityRenderData);
218 // NOLINTEND
219};
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 Block.h:42
Definition ConduitBlockActor.h:20
Definition DecoratedPotBlockActor.h:23
Definition ItemActor.h:30
Definition ItemGraphics.h:5
Definition ItemRenderer.h:5
MCAPI void forceGraphicsLoad()
MCAPI void _renderGuiDataDrivenBlockItem(::BaseActorRenderContext &renderContext, ::Block const *block, float x, float y, float scale, float const squeezeAmount, int const zOrder)
static MCAPI void _renderShieldItem(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::ItemActor &itemEntity, float actorFrameAlpha)
MCAPI ItemRenderer(::std::shared_ptr<::mce::TextureGroup > textureGroup, bool supportsNewVertexFormat)
MCAPI void _renderDecoratedPotItem(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::ItemActor &itemEntity, bool isItem)
MCAPI void _renderGuiBlockTypeItem(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::BlockGraphics const *blockGraphics, ::mce::TexturePtr const &texture, float x, float y, float lightMultiplier, float alphaMultiplier, float scale, float const pickupPopPercentage, int const zOrder)
MCAPI void _renderItemGroup(::BaseActorRenderContext &renderContext, ::ItemActor &itemEntity, int itemCount, float scaleValue, float frameAlpha, bool const useMatrixAsIs) const
MCAPI void * $ctor(::std::shared_ptr<::mce::TextureGroup > textureGroup, bool supportsNewVertexFormat)
MCAPI::ItemGraphics & getGraphics(::ItemStack const &item)
MCAPI void _renderBannerItem(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::ItemActor &itemEntity, bool isItem, float actorFrameAlpha)
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