LeviLamina
Loading...
Searching...
No Matches
Agent.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/world/actor/ActorEvent.h"
8#include "mc/world/actor/ActorInitializationMethod.h"
9#include "mc/world/actor/Mob.h"
10#include "mc/world/actor/agent/AgentAnimation.h"
11#include "mc/world/actor/agent/AgentRenderData.h"
12
13// auto generated forward declare list
14// clang-format off
15class AABB;
16class Actor;
19class ActorHurtResult;
20class BodyControl;
21class EntityContext;
22class ItemStack;
23class Player;
24class Vec3;
26struct ActorUniqueID;
28namespace mce { class Color; }
29// clang-format on
30
31class Agent : public ::Mob {
32public:
33 // Agent inner types define
34 enum class AnimState : int {
35 Idle = 0,
36 Moving = 1,
37 ArmSwing = 2,
38 Shrug = 3,
39 };
40
41public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<1, 1, bool> mIsHovering;
45 ::ll::TypedStorage<4, 8, ::Vec2> mHorizontalTarget;
46 ::ll::TypedStorage<4, 4, float> mVerticalTarget;
47 ::ll::TypedStorage<4, 4, int> mSelectedSlot;
48 ::ll::TypedStorage<1, 1, bool> mHasSetName;
49 ::ll::TypedStorage<1, 1, bool> mHasFiredCreationEvent;
50 ::ll::TypedStorage<8, 16, ::AgentRenderData> mRenderData;
51 // NOLINTEND
52
53public:
54 // prevent constructor by default
55 Agent();
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 virtual ::mce::Color getNameTagTextColor() const /*override*/;
61
62 virtual bool canShowNameTag() const /*override*/;
63
64 virtual bool canBePulledIntoVehicle() const /*override*/;
65
66 virtual bool canBeAffected(uint id) const /*override*/;
67
68 virtual void knockback(::Actor*, int, float, float, float, float, float) /*override*/;
69
70 virtual void handleEntityEvent(::ActorEvent id, int data) /*override*/;
71
72 virtual void
73 initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
74
75 virtual bool createAIGoals() /*override*/;
76
77 virtual void setCarriedItem(::ItemStack const& item) /*override*/;
78
79 virtual void normalTick() /*override*/;
80
81 virtual void baseTick() /*override*/;
82
83 virtual void
84 teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int entityType, bool keepVelocity) /*override*/;
85
86 virtual bool canExistWhenDisallowMob() const /*override*/;
87
88 virtual bool isTargetable() const /*override*/;
89
90 virtual bool isInvisible() const /*override*/;
91
92 virtual void kill() /*override*/;
93
94 virtual void setOwner(::ActorUniqueID const id) /*override*/;
95
96 virtual ::ActorHurtResult
97 _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
98
99 virtual ::std::unique_ptr<::BodyControl> initBodyControl() /*override*/;
100
101 virtual ~Agent() /*override*/ = default;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI Agent(
108 ::ActorDefinitionGroup* definitions,
109 ::ActorDefinitionIdentifier const& definitionName,
110 ::EntityContext& entityContext
111 );
112
113 MCAPI bool _isOnGround(::AABB const& aabb);
114
115 MCAPI float getMoveSpeedScalar() const;
116
117 MCAPI int getSwingAnimationDuration() const;
118
119 MCAPI void handleAnimationEvent(::AgentAnimation anim);
120
121 MCAPI bool isArmSwinging() const;
122
123 MCAPI bool isEmoting() const;
124
125 MCAPI bool isShrugging() const;
126
127 MCAPI void setNameTagFromOwner(::Player const& player);
128
129 MCAPI void shrug();
130
131 MCAPI void swingArm();
132
133 MCAPI void tryFireCreateEvent(::Player& player);
134 // NOLINTEND
135
136public:
137 // constructor thunks
138 // NOLINTBEGIN
139 MCAPI void* $ctor(
140 ::ActorDefinitionGroup* definitions,
141 ::ActorDefinitionIdentifier const& definitionName,
142 ::EntityContext& entityContext
143 );
144 // NOLINTEND
145
146public:
147 // virtual function thunks
148 // NOLINTBEGIN
149 MCAPI ::mce::Color $getNameTagTextColor() const;
150
151 MCFOLD bool $canShowNameTag() const;
152
153 MCFOLD bool $canBePulledIntoVehicle() const;
154
155 MCFOLD bool $canBeAffected(uint id) const;
156
157 MCFOLD void $knockback(::Actor*, int, float, float, float, float, float);
158
159 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
160
161 MCAPI void $initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params);
162
163 MCAPI bool $createAIGoals();
164
165 MCAPI void $setCarriedItem(::ItemStack const& item);
166
167 MCAPI void $normalTick();
168
169 MCAPI void $baseTick();
170
171 MCAPI void $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int entityType, bool keepVelocity);
172
173 MCFOLD bool $canExistWhenDisallowMob() const;
174
175 MCFOLD bool $isTargetable() const;
176
177 MCAPI bool $isInvisible() const;
178
179 MCAPI void $kill();
180
181 MCAPI void $setOwner(::ActorUniqueID const id);
182
183 MCAPI ::ActorHurtResult $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
184
185 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();
186
187
188 // NOLINTEND
189
190public:
191 // vftables
192 // NOLINTBEGIN
193 MCAPI static void** $vftable();
194 // NOLINTEND
195};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:36
Definition ActorHurtResult.h:5
Definition Actor.h:106
Definition BodyControl.h:13
Definition EntityContext.h:16
Definition ItemStack.h:26
Definition Player.h:129
Definition Vec3.h:10
Definition Color.h:13
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition VariantParameterList.h:13