LeviLamina
Loading...
Searching...
No Matches
ActorRenderData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec2.h"
7#include "mc/deps/core/math/Vec3.h"
8#include "mc/deps/minecraft_renderer/framebuilder/CustomSurfaceShaderMetadata.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
15class ItemStack;
16class Matrix;
17class Mob;
19class RenderParams;
20class Vec4;
21namespace mce { class Color; }
22// clang-format on
23
24class ActorRenderData {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 8, ::Actor*> mActor;
29 ::ll::TypedStorage<8, 8, ::ItemStack const*> mItemStack;
30 ::ll::TypedStorage<4, 12, ::Vec3> position;
31 ::ll::TypedStorage<4, 8, ::Vec2> rotation;
32 ::ll::TypedStorage<4, 8, ::Vec2> mHeadRot;
33 ::ll::TypedStorage<1, 1, bool> glint;
34 ::ll::TypedStorage<1, 1, bool> mIgnoreLighting;
35 ::ll::TypedStorage<1, 1, bool> mIsInUI;
36 ::ll::TypedStorage<4, 4, float> mDeltaTime;
37 ::ll::TypedStorage<8, 8, ::AnimationComponent&> mAnimationComponent;
38 ::ll::TypedStorage<8, 8, ::MolangVariableMap&> mVariables;
39 ::ll::TypedStorage<4, 8, ::mce::framebuilder::CustomSurfaceShaderMetadata> mCSSMetadata;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 ActorRenderData& operator=(ActorRenderData const&);
45 ActorRenderData(ActorRenderData const&);
46 ActorRenderData();
47
48public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI ActorRenderData(bool isInUI, ::Actor& actor, ::Vec3 const& cameraTargetPosition, float frameAlpha);
52
53 MCAPI ActorRenderData(
54 bool isInUI,
55 ::AnimationComponent& animationComponent,
56 ::MolangVariableMap& variables,
57 ::Vec3 const& cameraTargetPosition,
58 float frameAlpha
59 );
60
61 MCAPI void _Level_setupShading(
62 ::BaseActorRenderContext& renderContext,
63 ::mce::Color const& overlayColor,
64 ::mce::Color const& changeColor,
65 ::mce::Color const& changeColor2,
66 ::Vec4 const& uvAnim,
67 float br,
68 bool ignoreLighting,
69 bool filterLighting,
70 bool isEnchanted
71 ) const;
72
73 MCAPI void _UI_setupShading(
74 ::BaseActorRenderContext& renderContext,
75 ::mce::Color const& uvAnim,
76 ::mce::Color const&,
77 ::mce::Color const&,
78 ::Vec4 const&,
79 float,
80 bool,
81 bool
82 ) const;
83
84 MCAPI void applyCustomScale(::Matrix& worldMatrix) const;
85
86 MCAPI void applyGlobalAnims(::Matrix& worldMatrix, ::BaseActorRenderContext& renderContext) const;
87
88 MCFOLD ::Actor* getActor() const;
89
90 MCFOLD ::AnimationComponent& getAnimationComponent() const;
91
92 MCAPI float getBodyYawDegrees(float frameAlpha) const;
93
94 MCAPI float getHeightOffset() const;
95
96 MCFOLD bool getIgnoreLighting() const;
97
98 MCFOLD ::ItemStack const* getItemStack() const;
99
100 MCFOLD ::MolangVariableMap& getMolangVariables() const;
101
102 MCFOLD void setItemStack(::ItemStack const* item);
103
104 MCAPI void setupShading(
105 ::BaseActorRenderContext& renderContext,
106 ::mce::Color const& overlayColor,
107 ::mce::Color const& changeColor,
108 ::mce::Color const& changeColor2,
109 ::Vec4 const& uvAnim,
110 float br,
111 bool isEnchanted,
112 bool ignoreLighting,
113 bool filterLighting
114 ) const;
115
116 MCAPI bool shouldRender() const;
117
118 MCAPI void updateMolangVariables(::RenderParams& renderParams) const;
119 // NOLINTEND
120
121public:
122 // static functions
123 // NOLINTBEGIN
124 MCAPI static float
125 additionalDamageNearbyMobsYRotation(::Mob const& mob, float actorFrameAlpha, bool isFirstPersonPlayer);
126
127 MCAPI static ::std::optional<::std::pair<float, float>>
128 getDamageOrGlidingXYRotation(::Mob const& mob, float actorFrameAlpha, bool isFirstPersonPlayer);
129
130 MCAPI static float getDeathRotation(::Mob const& mob, float actorFrameAlpha);
131
132 MCAPI static bool getIsFirstPersonPlayer(::Mob& mob);
133
134 MCAPI static ::std::optional<::std::pair<float, float>> getNamedRotationAndOffset(::Mob const& mob);
135 // NOLINTEND
136
137public:
138 // constructor thunks
139 // NOLINTBEGIN
140 MCAPI void* $ctor(bool isInUI, ::Actor& actor, ::Vec3 const& cameraTargetPosition, float frameAlpha);
141
142 MCAPI void* $ctor(
143 bool isInUI,
144 ::AnimationComponent& animationComponent,
145 ::MolangVariableMap& variables,
146 ::Vec3 const& cameraTargetPosition,
147 float frameAlpha
148 );
149 // NOLINTEND
150};
Definition ActorRenderData.h:5
Definition Actor.h:125
Definition AnimationComponent.h:37
Definition BaseActorRenderContext.h:5
Definition ItemStack.h:35
Definition Matrix.h:10
Definition Mob.h:57
Definition MolangVariableMap.h:18
Definition RenderParams.h:30
Definition Vec4.h:5
Definition Color.h:13