LeviLamina
Loading...
Searching...
No Matches
ItemInHandRenderer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/renderer/ActorShaderManager.h"
7#include "mc/deps/core/utility/pub_sub/Connector.h"
8#include "mc/deps/minecraft_renderer/game/ItemContextFlags.h"
9#include "mc/deps/renderer/MatrixStack.h"
10#include "mc/world/item/InHandUpdateType.h"
11#include "mc/world/level/block/BlockShape.h"
12
13// auto generated forward declare list
14// clang-format off
15class Actor;
16class BaseActorRenderContext;
17class Block;
18class BlockType;
19class IClientInstance;
20class ItemStack;
21class Level;
22class Mob;
23class Player;
24class Tessellator;
26class Vec3;
27struct BlockTessellator;
28struct Brightness;
30struct ItemRenderCall;
31namespace dragon { struct RenderMetadata; }
32namespace mce { class Camera; }
33namespace mce { class MaterialPtr; }
34namespace mce { class TextureGroup; }
35namespace mce { struct ViewportInfo; }
36// clang-format on
37
39public:
40 // ItemInHandRenderer inner types declare
41 // clang-format off
42 struct OffsetForLowAspectRatio;
43 // clang-format on
44
45 // ItemInHandRenderer inner types define
47 public:
48 // OffsetForLowAspectRatio inner types declare
49 // clang-format off
50 struct Scoped;
51 // clang-format on
52
53 // OffsetForLowAspectRatio inner types define
54 enum class Direction : uchar {
55 Left = 0,
56 Right = 1,
57 };
58
59 struct Scoped {
60 public:
61 // member variables
62 // NOLINTBEGIN
70 // NOLINTEND
71
72 public:
73 // prevent constructor by default
74 Scoped& operator=(Scoped const&);
75 Scoped(Scoped const&);
76 Scoped();
77
78 public:
79 // member functions
80 // NOLINTBEGIN
81 MCNAPI ~Scoped();
82 // NOLINTEND
83
84 public:
85 // destructor thunk
86 // NOLINTBEGIN
87 MCNAPI void $dtor();
88 // NOLINTEND
89 };
90
91 public:
92 // static functions
93 // NOLINTBEGIN
94 MCNAPI static bool apply(
95 ::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction,
96 ::MatrixStack::MatrixStackRef& worldMatrix,
97 ::mce::ViewportInfo const& viewportInfo,
98 ::mce::Camera const& camera,
99 bool isFirstPerson,
100 float xScale
101 );
102 // NOLINTEND
103 };
104
105public:
106 // member variables
107 // NOLINTBEGIN
144 // NOLINTEND
145
146public:
147 // prevent constructor by default
148 ItemInHandRenderer& operator=(ItemInHandRenderer const&);
151
152public:
153 // virtual functions
154 // NOLINTBEGIN
155 virtual ~ItemInHandRenderer() /*override*/;
156 // NOLINTEND
157
158public:
159 // member functions
160 // NOLINTBEGIN
162 ::IClientInstance& client,
163 ::BlockTessellator& commonRenderer,
164 ::std::shared_ptr<::mce::TextureGroup> textureGroup
165 );
166
168 ::MatrixStack::MatrixStackRef& worldMatrix,
169 ::ItemStack const& item,
170 bool isInHandItem,
171 ::BlockType const* blockType,
172 ::BlockShape blockShape,
173 ::ItemRenderCall const* renderObjectCall,
174 bool posAndRotSetByJSON
175 );
176
178 ::BaseActorRenderContext& renderContext,
179 ::Player& player,
180 ::MatrixStack::MatrixStackRef& worldMatrix,
181 float frameAlpha,
182 bool matrixSetFromJson,
183 bool useBlockTransforms
184 );
185
187 ::BaseActorRenderContext& renderContext,
188 ::ItemRenderCall const* renderObjectCall,
189 ::Player& player,
190 ::MatrixStack::MatrixStackRef& worldMatrix,
191 float frameAlpha,
192 bool matrixSetFromJson,
193 ::ItemContextFlags itemFlags
194 );
195
197 ::BaseActorRenderContext& renderContext,
198 ::Player& player,
199 ::MatrixStack::MatrixStackRef& worldMatrix,
200 float frameAlpha
201 );
202
203 MCNAPI bool _areNotMatchingChemistrySticks(::ItemStack& itemBefore, ::ItemStack const& itemAfter);
204
205 MCNAPI ::Vec3
206 _calculateOffhandWorldTranslation(::Player const& player, ::BaseActorRenderContext const& renderContext) const;
207
208 MCNAPI ::InHandUpdateType _checkAndUpdateIfItemChanged(
209 ::ItemStack& itemBefore,
210 ::ItemStack const& itemAfter,
211 bool isMainHand,
212 bool slotChanged
213 );
214
215 MCNAPI ::ItemRenderCall* _getRenderCall(::Mob* mob, ::ItemStack const& itemInstance, int fallbackFrame);
216
217 MCNAPI void
218 _pushSparklerParticles(::BaseActorRenderContext& renderContext, ::ItemStack const& item, ::Level& level);
219
220 MCNAPI ::ItemRenderCall&
221 _rebuildItem(::BaseActorRenderContext& renderContext, ::Mob* mob, ::ItemStack const& item, int fallbackFrame);
222
224 ::BaseActorRenderContext& renderContext,
225 ::dragon::RenderMetadata renderMetadata,
226 ::ItemStack const& item,
227 ::Actor& entity,
228 ::Brightness lightEmission,
229 float frameAlpha,
230 float scale
231 ) const;
232
234 ::BaseActorRenderContext& renderContext,
235 ::dragon::RenderMetadata renderMetadata,
236 ::BlockType const* blockType,
237 ::Actor& entity,
238 bool isInHandItem
239 ) const;
240
242 ::BaseActorRenderContext& renderContext,
243 ::dragon::RenderMetadata renderMetadata,
244 ::Actor& entity,
245 ::Brightness lightEmission,
246 float frameAlpha
247 ) const;
248
250 ::BaseActorRenderContext& renderContext,
251 ::dragon::RenderMetadata renderMetadata,
252 ::ItemStack const& item,
253 ::Actor& entity,
254 bool isFirstPerson,
255 bool isInHandItem
256 ) const;
257
259 ::BaseActorRenderContext& renderContext,
260 ::dragon::RenderMetadata renderMetadata,
261 ::ItemStack const& item,
262 ::Actor& entity,
263 bool isFirstPerson
264 ) const;
265
267 ::BaseActorRenderContext& renderContext,
268 ::Player& player,
269 float xRot,
270 float inverseArmHeight,
271 float attackValue
272 );
273
274 MCNAPI void _renderFirstPersonHandsAndAttachables(::BaseActorRenderContext& renderContext, ::Player& player);
275
276 MCNAPI void
277 _renderFishingRod(::BaseActorRenderContext& renderContext, ::ItemStack const& item, ::Actor& entity) const;
278
280 ::BaseActorRenderContext& renderContext,
281 ::dragon::RenderMetadata renderMetadata,
282 ::ItemStack const& item,
283 ::Actor& entity,
284 ::Brightness lightEmission,
285 float frameAlpha,
286 ::ItemContextFlags itemFlags,
287 float scale
288 );
289
291 ::BaseActorRenderContext& renderContext,
292 ::Player& player,
293 float xRot,
294 float inverseArmHeight,
295 float attackValue
296 );
297
299 ::BaseActorRenderContext& renderContext,
300 ::Player& player,
301 float xRot,
302 float inverseArmHeight,
303 float attackValue
304 );
305
306 MCNAPI void _renderMiniMapHand(::BaseActorRenderContext& renderContext, ::Player& player, bool inOffhand);
307
308 MCNAPI void
309 _renderPhotoMapItem(::BaseActorRenderContext& renderContext, ::Player& player, float frameAlpha, bool isMainHand);
310
312 ::BaseActorRenderContext& renderContext,
313 ::dragon::RenderMetadata renderMetadata,
314 ::ItemStack const& item,
315 ::Actor& entity,
316 ::Brightness lightEmission,
317 float frameAlpha
318 ) const;
319
321 ::BaseActorRenderContext& renderContext,
322 ::dragon::RenderMetadata renderMetadata,
323 ::ItemStack const& item,
324 ::Actor& entity,
325 ::Brightness lightEmission,
326 float frameAlpha
327 ) const;
328
329 MCNAPI bool _shouldRenderOffhandItem(::Player& player) const;
330
331 MCNAPI void _tessellateBlockItem(::Tessellator& tessellator, ::BlockTessellator& t, ::Block const& block);
332
334 ::BaseActorRenderContext& renderContext,
335 ::TextureTessellator& textureTessellator,
336 ::Mob* mob,
337 ::ItemStack const& item,
338 int fallbackFrame,
339 ushort& heightOut,
340 ushort& widthOut
341 );
342
343 MCNAPI void _transformOffhandItem(::MatrixStack::MatrixStackRef& worldMatrix);
344
345 MCNAPI void _transformOffhandTool(::MatrixStack::MatrixStackRef& worldMatrix, ::ItemStack const& item, float a);
346
348 ::MatrixStack::MatrixStackRef& worldMatrix,
349 ::ItemStack const& item,
350 bool isMainHand,
351 ::ItemContextFlags itemFlags
352 );
353
354 MCNAPI void clearRenderObjects();
355
356 MCNAPI ::mce::MaterialPtr const&
357 getObjectMaterial(::ItemRenderCall const& renderObject, ::ItemContextFlags itemFlags) const;
358
359 MCNAPI ::ItemRenderCall const&
360 getRenderCallAtFrame(::BaseActorRenderContext& renderContext, ::ItemStack const& item, int frame);
361
362 MCNAPI void initMaterials(::std::shared_ptr<::mce::TextureGroup> textureGroup);
363
364 MCNAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector<void(bool)>& connector);
365
366 MCNAPI void renderFirstPerson(::BaseActorRenderContext& renderContext, ::ItemContextFlags itemFlags);
367
368 MCNAPI void renderItem(
369 ::BaseActorRenderContext& renderContext,
370 ::Actor& entity,
371 ::ItemStack const& item,
372 bool posAndRotSetByJSON,
373 ::ItemContextFlags itemFlags,
374 bool useMatrixAsIs,
375 bool renderingMainHand
376 );
377
378 MCNAPI void renderItemNew(
379 ::BaseActorRenderContext& renderContext,
380 ::Actor& entity,
381 ::ItemStack const& item,
382 ::ItemContextFlags itemFlags,
383 ::Brightness lightEmission
384 );
385
386 MCNAPI void
387 renderMainhandItem(::BaseActorRenderContext& renderContext, ::Player& player, ::ItemContextFlags itemFlags);
388
389 MCNAPI void renderObject(
390 ::BaseActorRenderContext& renderContext,
392 ::dragon::RenderMetadata const& renderMetadata,
393 ::ItemContextFlags itemFlags
394 );
395
396 MCNAPI void
397 renderOffhandItem(::BaseActorRenderContext& renderContext, ::Player& player, ::ItemContextFlags itemFlags);
398
399 MCNAPI void
400 tessellateAtFrame(::BaseActorRenderContext& renderContext, ::Mob* mob, ::ItemStack const& item, int frame);
401
402 MCNAPI void tick();
403 // NOLINTEND
404
405public:
406 // static functions
407 // NOLINTBEGIN
408 MCNAPI static ::dragon::RenderMetadata _createRenderMetadata(
409 ::BaseActorRenderContext const& renderContext,
410 ::Actor const& entity,
411 ::ItemStack const& item
412 );
413
414 MCNAPI static bool canTessellateAsBlockItem(::ItemStack const& item);
415
417 ::MatrixStack::MatrixStackRef& worldMatrix,
418 ::mce::ViewportInfo const& viewportInfo,
419 ::mce::Camera const& camera,
420 float xRot,
421 float inverseArmHeight,
422 float attackValue
423 );
424 // NOLINTEND
425
426public:
427 // constructor thunks
428 // NOLINTBEGIN
429 MCNAPI void* $ctor(
430 ::IClientInstance& client,
431 ::BlockTessellator& commonRenderer,
432 ::std::shared_ptr<::mce::TextureGroup> textureGroup
433 );
434 // NOLINTEND
435
436public:
437 // destructor thunk
438 // NOLINTBEGIN
439 MCNAPI void $dtor();
440 // NOLINTEND
441
442public:
443 // vftables
444 // NOLINTBEGIN
445 MCNAPI static void** $vftable();
446 // NOLINTEND
447};
Definition ActorShaderManager.h:5
Definition ItemInHandRenderer.h:5
MCAPI void _renderChestBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::BlockType const *blockType, ::Actor &entity, bool isInHandItem) const
MCAPI void tessellateAtFrame(::BaseActorRenderContext &renderContext, ::Mob *mob, ::ItemStack const &item, int frame)
MCAPI void _renderItemInOffhand(::BaseActorRenderContext &renderContext, ::Player &player, float xRot, float inverseArmHeight, float attackValue)
MCAPI void _applyOffhandItemTransforms(::BaseActorRenderContext &renderContext, ::ItemRenderCall const *renderObjectCall, ::Player &player, ::MatrixStack::MatrixStackRef &worldMatrix, float frameAlpha, bool matrixSetFromJson, ::ItemContextFlags itemFlags)
MCAPI void * $ctor(::IClientInstance &client, ::BlockTessellator &commonRenderer, ::std::shared_ptr<::mce::TextureGroup > textureGroup)
MCAPI::Vec3 _calculateOffhandWorldTranslation(::Player const &player, ::BaseActorRenderContext const &renderContext) const
MCAPI void $dtor()
MCAPI void initMaterials(::std::shared_ptr<::mce::TextureGroup > textureGroup)
MCAPI void _renderDynamicTexturedItemInHands(::BaseActorRenderContext &renderContext, ::Player &player, float xRot, float inverseArmHeight, float attackValue)
MCAPI void tick()
MCAPI::InHandUpdateType _checkAndUpdateIfItemChanged(::ItemStack &itemBefore, ::ItemStack const &itemAfter, bool isMainHand, bool slotChanged)
MCAPI void renderItemNew(::BaseActorRenderContext &renderContext, ::Actor &entity, ::ItemStack const &item, ::ItemContextFlags itemFlags, ::Brightness lightEmission)
MCAPI void _renderConduitBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::Actor &entity, ::Brightness lightEmission, float frameAlpha) const
MCAPI bool _shouldRenderOffhandItem(::Player &player) const
MCAPI void _renderShulkerBoxBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, ::Brightness lightEmission, float frameAlpha) const
MCAPI void _renderFirstPersonHandsAndAttachables(::BaseActorRenderContext &renderContext, ::Player &player)
MCAPI bool _areNotMatchingChemistrySticks(::ItemStack &itemBefore, ::ItemStack const &itemAfter)
MCAPI void _tessellateBlockItem(::Tessellator &tessellator, ::BlockTessellator &t, ::Block const &block)
MCAPI void renderFirstPerson(::BaseActorRenderContext &renderContext, ::ItemContextFlags itemFlags)
static MCAPI void computeMatrixForDynamicTexturedItemInHands(::MatrixStack::MatrixStackRef &worldMatrix, ::mce::ViewportInfo const &viewportInfo, ::mce::Camera const &camera, float xRot, float inverseArmHeight, float attackValue)
MCAPI void _renderBannerBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, ::Brightness lightEmission, float frameAlpha, float scale) const
MCAPI void _renderMiniMapHand(::BaseActorRenderContext &renderContext, ::Player &player, bool inOffhand)
MCAPI void _applyDefaultItemTransforms(::MatrixStack::MatrixStackRef &worldMatrix, ::ItemStack const &item, bool isInHandItem, ::BlockType const *blockType, ::BlockShape blockShape, ::ItemRenderCall const *renderObjectCall, bool posAndRotSetByJSON)
MCAPI void _renderItemInMainHand(::BaseActorRenderContext &renderContext, ::Player &player, float xRot, float inverseArmHeight, float attackValue)
MCAPI void _applyUseAnimation(::BaseActorRenderContext &renderContext, ::Player &player, ::MatrixStack::MatrixStackRef &worldMatrix, float frameAlpha)
MCAPI void renderItem(::BaseActorRenderContext &renderContext, ::Actor &entity, ::ItemStack const &item, bool posAndRotSetByJSON, ::ItemContextFlags itemFlags, bool useMatrixAsIs, bool renderingMainHand)
MCAPI void renderOffhandItem(::BaseActorRenderContext &renderContext, ::Player &player, ::ItemContextFlags itemFlags)
MCAPI void _transformWorldMatrixFromJson(::MatrixStack::MatrixStackRef &worldMatrix, ::ItemStack const &item, bool isMainHand, ::ItemContextFlags itemFlags)
MCAPI::mce::MaterialPtr const & getObjectMaterial(::ItemRenderCall const &renderObject, ::ItemContextFlags itemFlags) const
MCAPI void registerPauseManagerCallback(::Bedrock::PubSub::Connector< void(bool)> &connector)
MCAPI::ItemRenderCall * _getRenderCall(::Mob *mob, ::ItemStack const &itemInstance, int fallbackFrame)
static MCAPI void ** $vftable()
MCAPI void _renderCopperGolemStatueBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, bool isFirstPerson, bool isInHandItem) const
MCAPI::ItemRenderCall const & getRenderCallAtFrame(::BaseActorRenderContext &renderContext, ::ItemStack const &item, int frame)
MCAPI ItemInHandRenderer(::IClientInstance &client, ::BlockTessellator &commonRenderer, ::std::shared_ptr<::mce::TextureGroup > textureGroup)
MCAPI void _transformOffhandItem(::MatrixStack::MatrixStackRef &worldMatrix)
MCAPI void _transformOffhandTool(::MatrixStack::MatrixStackRef &worldMatrix, ::ItemStack const &item, float a)
MCAPI void renderObject(::BaseActorRenderContext &renderContext, ::ItemRenderCall const &renderObject, ::dragon::RenderMetadata const &renderMetadata, ::ItemContextFlags itemFlags)
MCAPI void clearRenderObjects()
MCAPI void _renderPhotoMapItem(::BaseActorRenderContext &renderContext, ::Player &player, float frameAlpha, bool isMainHand)
MCAPI void _renderSkullBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, ::Brightness lightEmission, float frameAlpha) const
MCAPI void _renderFishingRod(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::Actor &entity) const
MCAPI void _renderDecoratedPotBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, bool isFirstPerson) const
MCAPI void _tessellateTextureItem(::BaseActorRenderContext &renderContext, ::TextureTessellator &textureTessellator, ::Mob *mob, ::ItemStack const &item, int fallbackFrame, ushort &heightOut, ushort &widthOut)
MCAPI::ItemRenderCall & _rebuildItem(::BaseActorRenderContext &renderContext, ::Mob *mob, ::ItemStack const &item, int fallbackFrame)
MCAPI void _renderGlowstickBlockItem(::BaseActorRenderContext &renderContext, ::dragon::RenderMetadata renderMetadata, ::ItemStack const &item, ::Actor &entity, ::Brightness lightEmission, float frameAlpha, ::ItemContextFlags itemFlags, float scale)
static MCAPI bool canTessellateAsBlockItem(::ItemStack const &item)
MCAPI void _pushSparklerParticles(::BaseActorRenderContext &renderContext, ::ItemStack const &item, ::Level &level)
static MCAPI ::dragon::RenderMetadata _createRenderMetadata(::BaseActorRenderContext const &renderContext, ::Actor const &entity, ::ItemStack const &item)
MCAPI void _applyMainhandItemTransforms(::BaseActorRenderContext &renderContext, ::Player &player, ::MatrixStack::MatrixStackRef &worldMatrix, float frameAlpha, bool matrixSetFromJson, bool useBlockTransforms)
MCAPI void renderMainhandItem(::BaseActorRenderContext &renderContext, ::Player &player, ::ItemContextFlags itemFlags)
Definition Tessellator.h:5
Definition TextureTessellator.h:5
Definition BlockTessellator.h:5
Definition ItemInHandRenderFrameId.h:5
Definition ItemInHandRenderer.h:59
Definition ItemInHandRenderer.h:46
static MCAPI bool apply(::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction, ::MatrixStack::MatrixStackRef &worldMatrix, ::mce::ViewportInfo const &viewportInfo, ::mce::Camera const &camera, bool isFirstPerson, float xScale)
Definition ItemRenderCall.h:5
Definition Alias.h:14