3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/ActorShaderManager.h"
7#include "mc/deps/core/math/Matrix.h"
8#include "mc/deps/core/utility/pub_sub/Connector.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/deps/minecraft_renderer/game/ItemContextFlags.h"
11#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
12#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
13#include "mc/deps/renderer/MatrixStack.h"
14#include "mc/world/item/InHandUpdateType.h"
15#include "mc/world/item/ItemStack.h"
16#include "mc/world/level/block/BlockShape.h"
40namespace mce {
class Camera; }
61 enum class Direction : uchar {
70 ::ll::UntypedStorage<1, 1> mUnk8b3a1f;
71 ::ll::UntypedStorage<8, 8> mUnkad04bd;
72 ::ll::UntypedStorage<8, 8> mUnk711535;
73 ::ll::UntypedStorage<8, 8> mUnk673c3d;
74 ::ll::UntypedStorage<1, 1> mUnk70d991;
75 ::ll::UntypedStorage<4, 4> mUnk1a7539;
76 ::ll::UntypedStorage<1, 1> mUnkb8460a;
81 Scoped& operator=(Scoped
const&);
82 Scoped(Scoped
const&);
102 ::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction,
112 using RenderMap = ::std::map<::ItemInHandRenderFrameId, ::ItemRenderCall>;
117 ::ll::TypedStorage<8, 152, ::ItemStack> mItem;
118 ::ll::TypedStorage<8, 152, ::ItemStack> mOffHandItem;
119 ::ll::TypedStorage<4, 4, int> mSlot;
120 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
121 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TextureTessellator>> mTextureTessellator;
122 ::ll::TypedStorage<4, 4, float> mHeight;
123 ::ll::TypedStorage<4, 4, float> mOldHeight;
124 ::ll::TypedStorage<4, 4, float> mHeightOffHand;
125 ::ll::TypedStorage<4, 4, float> mOldHeightOffHand;
126 ::ll::TypedStorage<8, 8, ::BlockTessellator&> mBlockTessellator;
127 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlock;
128 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlockColor;
129 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaBlock;
130 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItem;
131 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatBlendBlock;
132 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatBlendBlockNoColor;
133 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaColoredBlock;
134 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItemMultiColorTint;
135 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaOneSidedBlock;
136 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaOneSidedColoredBlock;
137 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlockGlint;
138 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaBlockGlint;
139 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItemGlint;
140 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatFishingLine;
141 ::ll::TypedStorage<8, 128, ::std::array<::mce::MaterialPtr const*, 16>> mMaterialMatrix;
142 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mGlintTexture;
143 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BannerBlockActor>> mBannerEntity;
144 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DecoratedPotBlockActor>> mDecoratedPotEntity;
145 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SerializedActorBlockActor>> mCopperGolemStatueEntity;
146 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConduitBlockActor>> mConduitEntity;
147 ::ll::TypedStorage<8, 16, ::std::map<::ItemInHandRenderFrameId, ::ItemRenderCall>> mRenderObjects;
148 ::ll::TypedStorage<4, 64, ::Matrix> mTransform;
149 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPauseStateChange;
150 ::ll::TypedStorage<8, 8, ::std::chrono::duration<double, ::std::ratio<1, 1>>> mTimer;
151 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTime;
152 ::ll::TypedStorage<1, 1, bool> mIsDeferredEnabled;
157 ItemInHandRenderer& operator=(ItemInHandRenderer
const&);
158 ItemInHandRenderer(ItemInHandRenderer
const&);
159 ItemInHandRenderer();
164 virtual ~ItemInHandRenderer() ;
170 MCAPI ItemInHandRenderer(
173 ::std::shared_ptr<::mce::TextureGroup> textureGroup
176 MCAPI
void _applyDefaultItemTransforms(
181 ::BlockShape blockShape,
183 bool posAndRotSetByJSON
186 MCAPI
void _applyMainhandItemTransforms(
191 bool matrixSetFromJson,
192 bool useBlockTransforms
195 MCAPI
void _applyOffhandItemTransforms(
201 bool matrixSetFromJson,
202 ::ItemContextFlags itemFlags
205 MCAPI
void _applyUseAnimation(
217 MCAPI ::InHandUpdateType _checkAndUpdateIfItemChanged(
224 MCAPI ::ItemRenderCall* _getRenderCall(
::Mob* mob,
::ItemStack const& itemInstance,
int fallbackFrame);
228 MCAPI ::ItemRenderCall&
231 MCAPI
void _renderBannerBlockItem(
241 MCAPI
void _renderChestBlockItem(
249 MCAPI
void _renderConduitBlockItem(
257 MCAPI
void _renderCopperGolemStatueBlockItem(
266 MCAPI
void _renderDecoratedPotBlockItem(
274 MCAPI
void _renderDynamicTexturedItemInHands(
278 float inverseArmHeight,
287 MCAPI
void _renderGlowstickBlockItem(
294 ::ItemContextFlags itemFlags,
298 MCAPI
void _renderItemInMainHand(
302 float inverseArmHeight,
306 MCAPI
void _renderItemInOffhand(
310 float inverseArmHeight,
319 MCAPI
void _renderShulkerBoxBlockItem(
328 MCAPI
void _renderSkullBlockItem(
337 MCAPI
bool _shouldRenderOffhandItem(
::Player& player)
const;
341 MCAPI
void _tessellateTextureItem(
355 MCAPI
void _transformWorldMatrixFromJson(
359 ::ItemContextFlags itemFlags
362 MCAPI
void clearRenderObjects();
364 MCAPI ::mce::MaterialPtr
const&
365 getObjectMaterial(
::ItemRenderCall const& renderObject, ::ItemContextFlags itemFlags)
const;
367 MCAPI ::ItemRenderCall
const&
370 MCAPI
void initMaterials(::std::shared_ptr<::mce::TextureGroup> textureGroup);
376 MCAPI
void renderItem(
380 bool posAndRotSetByJSON,
381 ::ItemContextFlags itemFlags,
383 bool renderingMainHand
386 MCAPI
void renderItemNew(
390 ::ItemContextFlags itemFlags,
397 MCAPI
void renderObject(
401 ::ItemContextFlags itemFlags
416 MCAPI static ::dragon::RenderMetadata _createRenderMetadata(
422 MCAPI
static bool canTessellateAsBlockItem(
::ItemStack const& item);
424 MCAPI
static void computeMatrixForDynamicTexturedItemInHands(
429 float inverseArmHeight,
440 ::std::shared_ptr<::mce::TextureGroup> textureGroup
Definition ActorShaderManager.h:5
Definition BannerBlockActor.h:22
Definition BaseActorRenderContext.h:34
Definition BlockTessellator.h:5
Definition BlockType.h:84
Definition ConduitBlockActor.h:20
Definition DecoratedPotBlockActor.h:23
Definition IClientInstance.h:5
Definition ItemInHandRenderer.h:5
static MCAPI void ** $vftable()
Definition ItemStack.h:26
Definition SerializedActorBlockActor.h:27
Definition Tessellator.h:5
Definition TextureTessellator.h:5
Definition TextureGroup.h:7
Definition Brightness.h:8
Definition ItemInHandRenderFrameId.h:5
Definition ItemInHandRenderer.h:23
Definition ItemInHandRenderer.h:13
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 MatrixStack.h:18
Definition ViewportInfo.h:7