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