3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/ActorShaderManager.h"
7#include "mc/client/renderer/game/ItemInHandRenderFrameId.h"
8#include "mc/deps/core/math/Matrix.h"
9#include "mc/deps/core/utility/pub_sub/Connector.h"
10#include "mc/deps/core/utility/pub_sub/Subscription.h"
11#include "mc/deps/minecraft_renderer/game/ItemContextFlags.h"
12#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
13#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
14#include "mc/deps/renderer/MatrixStack.h"
15#include "mc/world/item/ItemStack.h"
16#include "mc/world/level/block/BlockShape.h"
39namespace mce {
class Camera; }
60 enum class Direction : uchar {
69 ::ll::UntypedStorage<1, 1> mUnk8b3a1f;
70 ::ll::UntypedStorage<8, 8> mUnkad04bd;
71 ::ll::UntypedStorage<8, 8> mUnk711535;
72 ::ll::UntypedStorage<8, 8> mUnk673c3d;
73 ::ll::UntypedStorage<1, 1> mUnk70d991;
74 ::ll::UntypedStorage<4, 4> mUnk1a7539;
75 ::ll::UntypedStorage<1, 1> mUnkb8460a;
80 Scoped& operator=(Scoped
const&);
81 Scoped(Scoped
const&);
88 ::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction,
103 ::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction,
120 using RenderMap = ::std::map<::ItemInHandRenderFrameId, ::ItemRenderCall>;
125 ::ll::TypedStorage<8, 152, ::ItemStack> mItem;
126 ::ll::TypedStorage<8, 152, ::ItemStack> mOffHandItem;
127 ::ll::TypedStorage<4, 4, int> mSlot;
128 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClient;
129 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TextureTessellator>> mTextureTessellator;
130 ::ll::TypedStorage<4, 4, float> mHeight;
131 ::ll::TypedStorage<4, 4, float> mOldHeight;
132 ::ll::TypedStorage<4, 4, float> mHeightOffHand;
133 ::ll::TypedStorage<4, 4, float> mOldHeightOffHand;
134 ::ll::TypedStorage<8, 8, ::BlockTessellator&> mBlockTessellator;
135 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlock;
136 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlockColor;
137 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaBlock;
138 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItem;
139 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatBlendBlock;
140 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatBlendBlockNoColor;
141 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaColoredBlock;
142 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItemMultiColorTint;
143 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaOneSidedBlock;
144 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaOneSidedColoredBlock;
145 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatOpaqueBlockGlint;
146 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatAlphaBlockGlint;
147 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatItemGlint;
148 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> mMatFishingLine;
149 ::ll::TypedStorage<8, 128, ::std::array<::mce::MaterialPtr const*, 16>> mMaterialMatrix;
150 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mGlintTexture;
151 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BannerBlockActor>> mBannerEntity;
152 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DecoratedPotBlockActor>> mDecoratedPotEntity;
153 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SerializedActorBlockActor>> mCopperGolemStatueEntity;
154 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ConduitBlockActor>> mConduitEntity;
155 ::ll::TypedStorage<8, 16, ::std::map<::ItemInHandRenderFrameId, ::ItemRenderCall>> mRenderObjects;
156 ::ll::TypedStorage<4, 64, ::Matrix> mTransform;
157 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPauseStateChange;
158 ::ll::TypedStorage<8, 8, ::std::chrono::duration<double, ::std::ratio<1, 1>>> mTimer;
159 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTime;
160 ::ll::TypedStorage<1, 1, bool> mIsDeferredEnabled;
165 ItemInHandRenderer& operator=(ItemInHandRenderer
const&);
166 ItemInHandRenderer(ItemInHandRenderer
const&);
167 ItemInHandRenderer();
172 virtual ~ItemInHandRenderer() ;
178 MCAPI ItemInHandRenderer(
181 ::std::shared_ptr<::mce::TextureGroup> textureGroup
186 MCAPI
void _applyDefaultItemTransforms(
191 ::BlockShape blockShape,
194 bool posAndRotSetByJSON
197 MCAPI
void _applyMainhandItemTransforms(
202 bool matrixSetFromJson,
203 bool useBlockTransforms
206 MCAPI
void _applyOffhandItemTransforms(
212 bool matrixSetFromJson,
213 ::ItemContextFlags itemFlags
216 MCAPI
void _applyUseAnimation(
225 MCAPI ::ItemRenderCall* _getRenderCall(
::Mob* mob,
::ItemStack const& itemInstance,
int fallbackFrame);
227 MCAPI ::Vec3 _getScreenRatioAdjustment(
230 float horizontalSplitScreenOffset,
231 float verticalSplitScreenOffset
236 MCAPI ::ItemRenderCall&
239 MCAPI
void _renderBannerBlockItem(
245 ::std::optional<::glm::vec3>
const& lightEmissionColor,
250 MCAPI
void _renderChestBlockItem(
258 MCAPI
void _renderConduitBlockItem(
263 ::std::optional<::glm::vec3>
const& lightEmissionColor,
267 MCAPI
void _renderCopperGolemStatueBlockItem(
276 MCAPI
void _renderDecoratedPotBlockItem(
284 MCAPI
void _renderDynamicTexturedItemInHands(
288 float inverseArmHeight,
297 MCAPI
void _renderGlowstickBlockItem(
303 ::std::optional<::glm::vec3>
const& lightEmissionColor,
305 ::ItemContextFlags itemFlags,
309 MCAPI
void _renderItemInMainHand(
312 float inverseArmHeight,
324 MCAPI
void _renderShulkerBoxBlockItem(
330 ::std::optional<::glm::vec3>
const& lightEmissionColor,
334 MCAPI
void _renderSkullBlockItem(
340 ::std::optional<::glm::vec3>
const& lightEmissionColor,
344 MCAPI
bool _shouldRenderOffhandItem(
::Player& player)
const;
348 MCAPI
void _tessellateTextureItem(
362 MCAPI
void _transformWorldMatrixFromJson(
366 ::ItemContextFlags itemFlags,
370 MCAPI
void clearRenderObjects();
372 MCAPI ::mce::MaterialPtr
const&
373 getObjectMaterial(
::ItemRenderCall const& renderObject, ::ItemContextFlags itemFlags)
const;
375 MCAPI ::mce::TexturePtr
const& getObjectTexture(
::ItemRenderCall const& renderObject,
bool glint)
const;
377 MCAPI ::ItemRenderCall
const&
380 MCAPI
void initMaterials(::std::shared_ptr<::mce::TextureGroup> textureGroup);
382 MCAPI
void onItemUsed();
388 MCAPI
void renderItem(
392 bool posAndRotSetByJSON,
393 ::ItemContextFlags itemFlags,
395 bool renderingMainHand
398 MCAPI
void renderItemNew(
402 ::ItemContextFlags itemFlags,
409 MCAPI
void renderObject(
413 ::ItemContextFlags itemFlags
419 MCAPI
void shutdown();
430 MCAPI static ::dragon::RenderMetadata _createRenderMetadata(
436 MCAPI
static bool canTessellateAsBlockItem(
::ItemStack const& item);
438 MCAPI
static void computeMatrixForDynamicTexturedItemInHands(
443 float inverseArmHeight,
454 ::std::shared_ptr<::mce::TextureGroup> textureGroup
Definition ActorShaderManager.h:5
Definition BannerBlockActor.h:23
Definition BaseActorRenderContext.h:5
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 ItemRenderCall.h:5
Definition ItemStack.h:35
Definition SerializedActorBlockActor.h:30
Definition Tessellator.h:5
Definition TextureTessellator.h:5
Definition TextureGroup.h:7
Definition Brightness.h:8
Definition ItemInHandRenderer.h:23
MCAPI Scoped(::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction, ::MatrixStack::MatrixStackRef &worldMatrix, ::mce::ViewportInfo const &viewportInfo, ::mce::Camera const &camera, bool isFirstPerson, float xScale)
MCAPI void * $ctor(::ItemInHandRenderer::OffsetForLowAspectRatio::Direction direction, ::MatrixStack::MatrixStackRef &worldMatrix, ::mce::ViewportInfo const &viewportInfo, ::mce::Camera const &camera, bool isFirstPerson, float xScale)
Definition ItemInHandRenderer.h:13
Definition MatrixStack.h:13
Definition ViewportInfo.h:7