LeviLamina
Loading...
Searching...
No Matches
MeleeAttackBaseGoal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/world/actor/ActorCategory.h"
8#include "mc/world/actor/ActorDefinitionTrigger.h"
9#include "mc/world/actor/TempEPtr.h"
10#include "mc/world/actor/ai/goal/BaseGoal.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Mob;
17class Path;
18namespace SharedTypes::v1_21_120 { struct MeleeAttackBaseGoalDefinition; }
19// clang-format on
20
21class MeleeAttackBaseGoal : public ::BaseGoal {
22public:
23 // MeleeAttackBaseGoal inner types declare
24 // clang-format off
25 struct NavigationSettings;
26 // clang-format on
27
28 // MeleeAttackBaseGoal inner types define
30 public:
31 // NavigationSettings inner types define
33
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
38 ::ll::TypedStorage<4, 4, int> mMinPathTicks;
39 ::ll::TypedStorage<4, 4, int> mMaxPathTicks;
40 ::ll::TypedStorage<4, 4, int> mPathFailTickIncrease;
41 ::ll::TypedStorage<4, 4, int> mInnerBoundaryTickIncrease;
42 ::ll::TypedStorage<4, 4, int> mOuterBoundaryTickIncrease;
43 ::ll::TypedStorage<4, 4, int> mTicksToRecalculatePath;
44 ::ll::TypedStorage<4, 4, float> mPathInnerBoundarySq;
45 ::ll::TypedStorage<4, 4, float> mPathOuterBoundarySq;
46 ::ll::TypedStorage<4, 4, float> mSpeedMultiplier;
47 ::ll::TypedStorage<1, 1, bool> mRequireCompletePath;
48 ::ll::TypedStorage<1, 1, bool> mTrackTarget;
49 ::ll::TypedStorage<1, 1, bool> mHijackMountNavigation;
50 // NOLINTEND
51
52 public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI ~NavigationSettings();
56 // NOLINTEND
57
58 public:
59 // destructor thunk
60 // NOLINTBEGIN
61 MCFOLD void $dtor();
62 // NOLINTEND
63 };
64
65public:
66 // member variables
67 // NOLINTBEGIN
68 ::ll::TypedStorage<8, 48, ::MeleeAttackBaseGoal::NavigationSettings> mNavigation;
69 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
70 ::ll::TypedStorage<8, 40, ::TempEPtr<::Actor>> mTarget;
71 ::ll::TypedStorage<4, 12, ::Vec3> mLastCachedTargetPosition;
72 ::ll::TypedStorage<4, 4, ::ActorCategory> mAttackTypes;
73 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnAttack;
74 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnKill;
75 ::ll::TypedStorage<4, 4, float> mMeleeFov;
76 ::ll::TypedStorage<4, 4, float> mMaxRotationX;
77 ::ll::TypedStorage<4, 4, float> mMaxHeadRotationY;
78 ::ll::TypedStorage<4, 4, int> mRandomStopInterval;
79 ::ll::TypedStorage<4, 4, int> mAttackTicks;
80 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
81 ::ll::TypedStorage<1, 1, bool> mAttackOnce;
82 ::ll::TypedStorage<1, 1, bool> mHasAttacked;
83 ::ll::TypedStorage<1, 1, bool> mSetPersistent;
84 ::ll::TypedStorage<1, 1, bool> mCanSpreadOnFire;
85 // NOLINTEND
86
87public:
88 // prevent constructor by default
89 MeleeAttackBaseGoal& operator=(MeleeAttackBaseGoal const&);
90 MeleeAttackBaseGoal(MeleeAttackBaseGoal const&);
91 MeleeAttackBaseGoal();
92
93public:
94 // virtual functions
95 // NOLINTBEGIN
96 virtual ~MeleeAttackBaseGoal() /*override*/;
97
98 virtual bool canUse() /*override*/;
99
100 virtual bool canContinueToUse() /*override*/;
101
102 virtual void start() /*override*/;
103
104 virtual void stop() /*override*/;
105
106 virtual void tick() = 0;
107
108 virtual int getAttackTicksResetValue() const;
109 // NOLINTEND
110
111public:
112 // member functions
113 // NOLINTBEGIN
114 MCAPI explicit MeleeAttackBaseGoal(::Mob& mob);
115
116 MCAPI void _attemptAttackTarget(::Actor& target, bool canReachTarget, bool hasLineOfSight);
117
118 MCAPI void _attemptMoveToTarget(::Actor const& target);
119
120 MCAPI void _attemptMoveToTargetPosition(::Actor const& target, bool canReachTarget, float targetDistanceSq);
121
122 MCAPI void _decrementAttackTicks();
123
124 MCAPI void _decrementPathRecalculationTicks();
125
126 MCFOLD ::Vec3 const& _getLastCachedTargetPosition() const;
127
128 MCFOLD ::Mob& _getMob() const;
129
130 MCAPI ::Mob& _getNavigatingMob() const;
131
132 MCAPI ::NavigationComponent* _getNavigationComponent() const;
133
134 MCAPI ::Actor* _getTarget() const;
135
136 MCFOLD int _getTicksToRecalculatePath() const;
137
138 MCAPI void _increasePathRecalculationFailureTick();
139
140 MCAPI bool _isNavigationDoneOrStuck() const;
141
142 MCAPI void _resetAttackTicks();
143
144 MCAPI void _setHasAttacked();
145
146 MCAPI bool _shouldRecalculatePath(bool canReachTarget) const;
147
148 MCAPI bool _targetPositionPutsMobInSun();
149
150 MCAPI void _tryLookAtTarget(::Actor const& target) const;
151
152 MCFOLD int getAttackTicks() const;
153
154 MCFOLD int getCooldownTicks() const;
155
156 MCAPI float getMeleeFOV() const;
157
158 MCAPI bool hasAttackTicksLeft() const;
159
160 MCAPI bool isWithinFoV(::Vec3 const& position) const;
161 // NOLINTEND
162
163public:
164 // constructor thunks
165 // NOLINTBEGIN
166 MCAPI void* $ctor(::Mob& mob);
167 // NOLINTEND
168
169public:
170 // destructor thunk
171 // NOLINTBEGIN
172 MCFOLD void $dtor();
173 // NOLINTEND
174
175public:
176 // virtual function thunks
177 // NOLINTBEGIN
178 MCAPI bool $canUse();
179
180 MCAPI bool $canContinueToUse();
181
182 MCAPI void $start();
183
184 MCAPI void $stop();
185
186 MCFOLD int $getAttackTicksResetValue() const;
187
188
189 // NOLINTEND
190
191public:
192 // vftables
193 // NOLINTBEGIN
194 MCNAPI static void** $vftable();
195 // NOLINTEND
196};
Definition Actor.h:123
static MCAPI void ** $vftable()
Definition Mob.h:56
Definition NavigationComponent.h:22
Definition Path.h:16
Definition Vec3.h:10
Definition MeleeAttackBaseGoal.h:29
Definition MeleeAttackBaseGoalDefinition.h:16