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#include "mc/world/actor/agent/AgentTravelType.h"
13
14// auto generated forward declare list
15// clang-format off
16class AABB;
17class Actor;
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 // vIndex: 34
61 virtual ::mce::Color getNameTagTextColor() const /*override*/;
62
63 // vIndex: 32
64 virtual bool canShowNameTag() const /*override*/;
65
66 // vIndex: 96
67 virtual bool canBePulledIntoVehicle() const /*override*/;
68
69 // vIndex: 105
70 virtual bool canBeAffected(uint id) const /*override*/;
71
72 // vIndex: 138
73 virtual void knockback(::Actor*, int, float, float, float, float, float) /*override*/;
74
75 // vIndex: 69
76 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
77
78 // vIndex: 4
79 virtual void
80 initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
81
82 // vIndex: 168
83 virtual bool createAIGoals() /*override*/;
84
85 // vIndex: 77
86 virtual void setCarriedItem(::ItemStack const& item) /*override*/;
87
88 // vIndex: 24
89 virtual void normalTick() /*override*/;
90
91 // vIndex: 25
92 virtual void baseTick() /*override*/;
93
94 // vIndex: 21
95 virtual void
96 teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int entityType, bool keepVelocity) /*override*/;
97
98 // vIndex: 173
99 virtual bool canExistWhenDisallowMob() const /*override*/;
100
101 // vIndex: 50
102 virtual bool isTargetable() const /*override*/;
103
104 // vIndex: 31
105 virtual bool isInvisible() const /*override*/;
106
107 // vIndex: 122
108 virtual void kill() /*override*/;
109
110 // vIndex: 55
111 virtual void setOwner(::ActorUniqueID const ownerId) /*override*/;
112
113 // vIndex: 135
114 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
115
116 // vIndex: 175
117 virtual ::std::unique_ptr<::BodyControl> initBodyControl() /*override*/;
118
119 // vIndex: 8
120 virtual ~Agent() /*override*/ = default;
121 // NOLINTEND
122
123public:
124 // member functions
125 // NOLINTBEGIN
126 MCAPI Agent(
127 ::ActorDefinitionGroup* definitions,
128 ::ActorDefinitionIdentifier const& definitionName,
129 ::EntityContext& entityContext
130 );
131
132 MCAPI bool _isOnGround(::AABB const& aabb);
133
134 MCAPI ::Vec3 doServerTravel(::AABB const& aabb, ::AgentTravelType travelType);
135
136 MCAPI float getMoveSpeedScalar() const;
137
138 MCAPI void handleAnimationEvent(::AgentAnimation anim);
139
140 MCAPI bool isShrugging() const;
141
142 MCAPI void setNameTagFromOwner(::Player const& player);
143
144 MCAPI void shrug();
145
146 MCAPI void swingArm();
147
148 MCAPI void tryFireCreateEvent(::Player& player);
149 // NOLINTEND
150
151public:
152 // static functions
153 // NOLINTBEGIN
154 MCAPI static ::Agent* tryGetFromEntity(::EntityContext& entity, bool includeRemoved);
155 // NOLINTEND
156
157public:
158 // constructor thunks
159 // NOLINTBEGIN
160 MCAPI void* $ctor(
161 ::ActorDefinitionGroup* definitions,
162 ::ActorDefinitionIdentifier const& definitionName,
163 ::EntityContext& entityContext
164 );
165 // NOLINTEND
166
167public:
168 // virtual function thunks
169 // NOLINTBEGIN
170 MCAPI ::mce::Color $getNameTagTextColor() const;
171
172 MCFOLD bool $canShowNameTag() const;
173
174 MCFOLD bool $canBePulledIntoVehicle() const;
175
176 MCFOLD bool $canBeAffected(uint id) const;
177
178 MCFOLD void $knockback(::Actor*, int, float, float, float, float, float);
179
180 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
181
182 MCAPI void $initializeComponents(::ActorInitializationMethod method, ::VariantParameterList const& params);
183
184 MCAPI bool $createAIGoals();
185
186 MCAPI void $setCarriedItem(::ItemStack const& item);
187
188 MCAPI void $normalTick();
189
190 MCAPI void $baseTick();
191
192 MCAPI void $teleportTo(::Vec3 const& pos, bool shouldStopRiding, int cause, int entityType, bool keepVelocity);
193
194 MCFOLD bool $canExistWhenDisallowMob() const;
195
196 MCFOLD bool $isTargetable() const;
197
198 MCAPI bool $isInvisible() const;
199
200 MCAPI void $kill();
201
202 MCAPI void $setOwner(::ActorUniqueID const ownerId);
203
204 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
205
206 MCAPI ::std::unique_ptr<::BodyControl> $initBodyControl();
207 // NOLINTEND
208
209public:
210 // vftables
211 // NOLINTBEGIN
212 MCNAPI static void** $vftable();
213 // NOLINTEND
214};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:35
Definition Actor.h:102
Definition Agent.h:31
static MCAPI void ** $vftable()
Definition BodyControl.h:13
Definition EntityContext.h:16
Definition ItemStack.h:23
Definition Mob.h:47
Definition Player.h:123
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition VariantParameterList.h:13