LeviLamina
Loading...
Searching...
No Matches
RamAttackGoal.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/legacy/ActorUniqueID.h"
9#include "mc/util/json_util/JsonSchemaObjectNode.h"
10#include "mc/world/actor/ai/goal/BaseGoalDefinition.h"
11#include "mc/world/actor/ai/goal/Goal.h"
12#include "mc/world/level/Tick.h"
13
14// auto generated forward declare list
15// clang-format off
16class Mob;
17class Path;
18namespace JsonUtil { class EmptyClass; }
19namespace RamAttackGoalUtils { class RamGoalItemDropperInterface; }
20// clang-format on
21
22class RamAttackGoal : public ::Goal {
23public:
24 // RamAttackGoal inner types declare
25 // clang-format off
26 struct AttackPos;
27 class Definition;
28 // clang-format on
29
30 // RamAttackGoal inner types define
32 public:
33 // member variables
34 // NOLINTBEGIN
46 // NOLINTEND
47
48 public:
49 // prevent constructor by default
50 Definition& operator=(Definition const&);
51 Definition(Definition const&);
52 Definition();
53
54 public:
55 // virtual functions
56 // NOLINTBEGIN
57 // vIndex: 0
58 virtual ~Definition() /*override*/;
59 // NOLINTEND
60
61 public:
62 // member functions
63 // NOLINTBEGIN
64 MCNAPI void addPreRamSoundEventByName(::std::string const& name);
65
66 MCNAPI void addRamImpactSoundEventByName(::std::string const& name);
67 // NOLINTEND
68
69 public:
70 // static functions
71 // NOLINTBEGIN
72 MCNAPI static void buildSchema(
73 ::std::string const& name,
75 root
76 );
77 // NOLINTEND
78
79 public:
80 // destructor thunk
81 // NOLINTBEGIN
82 MCNAPI void $dtor();
83 // NOLINTEND
84
85 public:
86 // vftables
87 // NOLINTBEGIN
88 MCNAPI static void** $vftable();
89 // NOLINTEND
90 };
91
92 enum class State : int {
93 TakeAttackPos = 0,
94 TurnToTarget = 1,
95 VerifyTargetStillInPosition = 2,
96 WaitOneSec = 3,
97 Charge = 4,
98 KnockAfterCharge = 5,
99 Done = 6,
100 };
101
102 enum class Direction : int {
103 North = 0,
104 South = 1,
105 West = 2,
106 East = 3,
107 };
108
109 struct AttackPos {
110 public:
111 // member variables
112 // NOLINTBEGIN
118 // NOLINTEND
119
120 public:
121 // prevent constructor by default
122 AttackPos& operator=(AttackPos const&);
123 AttackPos(AttackPos const&);
124 AttackPos();
125 };
126
127public:
128 // member variables
129 // NOLINTBEGIN
130 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
131 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
132 ::ll::TypedStorage<4, 12, ::Vec3> mPrepareChargePos;
133 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPos;
134 ::ll::TypedStorage<4, 8, ::Vec2> mRamDirection;
135 ::ll::TypedStorage<8, 8, ::Tick> mWaitBeforeChargeTimer;
136 ::ll::TypedStorage<8, 8, ::Tick> mChargeTimeoutTimer;
137 ::ll::TypedStorage<8, 8, ::Tick> mKnockAfterChargeTimeoutTimer;
138 ::ll::TypedStorage<8, 8, ::Tick> mRamRetryTimeout;
139 ::ll::TypedStorage<4, 4, ::RamAttackGoal::State> mState;
140 ::ll::TypedStorage<8, 24, ::std::vector<::RamAttackGoal::AttackPos>> mAttackPosVector;
141 ::ll::TypedStorage<8, 128, ::RamAttackGoal::Definition> mDefinition;
142 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mTargetId;
143 ::ll::TypedStorage<1, 1, bool> mHasKnockbacked;
144 ::ll::TypedStorage<8, 8, ::Tick> mCooldownTimeout;
145 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RamAttackGoalUtils::RamGoalItemDropperInterface>> mRamGoalItemDropper;
146 // NOLINTEND
147
148public:
149 // prevent constructor by default
150 RamAttackGoal& operator=(RamAttackGoal const&);
153
154public:
155 // virtual functions
156 // NOLINTBEGIN
157 // vIndex: 4
158 virtual void start() /*override*/;
159
160 // vIndex: 5
161 virtual void stop() /*override*/;
162
163 // vIndex: 1
164 virtual bool canUse() /*override*/;
165
166 // vIndex: 2
167 virtual bool canContinueToUse() /*override*/;
168
169 // vIndex: 6
170 virtual void tick() /*override*/;
171
172 // vIndex: 7
173 virtual void appendDebugInfo(::std::string& str) const /*override*/;
174
175 // vIndex: 0
176 virtual ~RamAttackGoal() /*override*/;
177 // NOLINTEND
178
179public:
180 // member functions
181 // NOLINTBEGIN
182 MCNAPI explicit RamAttackGoal(::Mob& mob);
183
184 MCNAPI bool _hasChargePath();
185
186 MCNAPI bool _initiateRamAttack();
187
188 MCNAPI void _resetCooldown();
189
190 MCNAPI void _tryKnockbackTarget();
191
193 // NOLINTEND
194
195public:
196 // constructor thunks
197 // NOLINTBEGIN
198 MCNAPI void* $ctor(::Mob& mob);
199 // NOLINTEND
200
201public:
202 // destructor thunk
203 // NOLINTBEGIN
204 MCNAPI void $dtor();
205 // NOLINTEND
206
207public:
208 // virtual function thunks
209 // NOLINTBEGIN
210 MCNAPI void $start();
211
212 MCNAPI void $stop();
213
214 MCNAPI bool $canUse();
215
216 MCNAPI bool $canContinueToUse();
217
218 MCNAPI void $tick();
219
220 MCNAPI void $appendDebugInfo(::std::string& str) const;
221 // NOLINTEND
222
223public:
224 // vftables
225 // NOLINTBEGIN
226 MCNAPI static void** $vftable();
227 // NOLINTEND
228};
Definition BaseGoalDefinition.h:10
Definition Direction.h:5
Definition Goal.h:14
Definition JsonSchemaObjectNode.h:8
Definition Mob.h:47
Definition Path.h:16
Definition RamAttackGoal.h:31
static MCAPI void ** $vftable()
static MCAPI void buildSchema(::std::string const &name, ::std::shared_ptr<::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::RamAttackGoal::Definition > > &root)
MCAPI void addPreRamSoundEventByName(::std::string const &name)
MCAPI void addRamImpactSoundEventByName(::std::string const &name)
Definition RamAttackGoal.h:22
MCAPI void _resetCooldown()
MCAPI bool _hasChargePath()
MCAPI bool _verifyTargetStillInPositionAndPrepareForRamAttack()
MCAPI void _tryKnockbackTarget()
MCAPI void $appendDebugInfo(::std::string &str) const
MCAPI void * $ctor(::Mob &mob)
static MCAPI void ** $vftable()
MCAPI bool _initiateRamAttack()
MCAPI void $tick()
MCAPI bool $canUse()
MCAPI void $start()
MCAPI void $stop()
MCAPI void $dtor()
MCAPI bool $canContinueToUse()
MCAPI RamAttackGoal(::Mob &mob)
Definition RamAttackGoal.h:109
Definition Alias.h:14