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