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