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/deps/shared_types/shared_types/FloatRange.h"
10#include "mc/legacy/ActorUniqueID.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
17class Mob;
18class Path;
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 // clang-format on
28
29 // RamAttackGoal inner types define
30 enum class Direction : int {
31 North = 0,
32 South = 1,
33 West = 2,
34 East = 3,
35 };
36
37 enum class State : int {
38 TakeAttackPos = 0,
39 TurnToTarget = 1,
40 VerifyTargetStillInPosition = 2,
41 WaitOneSec = 3,
42 Charge = 4,
43 KnockAfterCharge = 5,
44 Done = 6,
45 };
46
47 struct AttackPos {
48 public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<4, 12, ::Vec3> mPosition;
52 ::ll::TypedStorage<4, 4, float> mDistance;
53 ::ll::TypedStorage<1, 1, bool> mCheckX;
54 ::ll::TypedStorage<4, 4, ::RamAttackGoal::Direction> mDirection;
55 ::ll::TypedStorage<1, 1, bool> mHasChargePos;
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
64 ::ll::TypedStorage<4, 12, ::Vec3> mPrepareChargePos;
65 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPos;
66 ::ll::TypedStorage<4, 8, ::Vec2> mRamDirection;
67 ::ll::TypedStorage<8, 8, ::Tick> mWaitBeforeChargeTimer;
68 ::ll::TypedStorage<8, 8, ::Tick> mChargeTimeoutTimer;
69 ::ll::TypedStorage<8, 8, ::Tick> mKnockAfterChargeTimeoutTimer;
70 ::ll::TypedStorage<8, 8, ::Tick> mRamRetryTimeout;
71 ::ll::TypedStorage<4, 4, ::RamAttackGoal::State> mState;
72 ::ll::TypedStorage<8, 24, ::std::vector<::RamAttackGoal::AttackPos>> mAttackPosVector;
73 ::ll::TypedStorage<4, 4, int> mRamDistance;
74 ::ll::TypedStorage<4, 4, int> mMinRamDistance;
75 ::ll::TypedStorage<4, 4, float> mKnockbackForce;
76 ::ll::TypedStorage<4, 4, float> mKnockbackHeight;
77 ::ll::TypedStorage<4, 4, float> mBabyKnockbackModifier;
78 ::ll::TypedStorage<4, 4, float> mRunSpeed;
79 ::ll::TypedStorage<4, 4, float> mRamSpeed;
80 ::ll::TypedStorage<8, 24, ::std::vector<::ActorDefinitionTrigger>> mOnStartTriggers;
81 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mPreRamSound;
82 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mRamImpactSound;
83 ::ll::TypedStorage<4, 8, ::SharedTypes::FloatRange> mCooldownTime;
84 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mTargetId;
85 ::ll::TypedStorage<1, 1, bool> mHasKnockbacked;
86 ::ll::TypedStorage<8, 8, ::Tick> mCooldownTimeout;
87 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RamAttackGoalUtils::RamGoalItemDropperInterface>> mRamGoalItemDropper;
88 // NOLINTEND
89
90public:
91 // prevent constructor by default
92 RamAttackGoal& operator=(RamAttackGoal const&);
93 RamAttackGoal(RamAttackGoal const&);
94 RamAttackGoal();
95
96public:
97 // virtual functions
98 // NOLINTBEGIN
99 virtual void start() /*override*/;
100
101 virtual void stop() /*override*/;
102
103 virtual bool canUse() /*override*/;
104
105 virtual bool canContinueToUse() /*override*/;
106
107 virtual void tick() /*override*/;
108
109 virtual void appendDebugInfo(::std::string& str) const /*override*/;
110
111 virtual ~RamAttackGoal() /*override*/;
112 // NOLINTEND
113
114public:
115 // member functions
116 // NOLINTBEGIN
117 MCAPI explicit RamAttackGoal(::Mob& mob);
118
119 MCAPI bool _hasChargePath();
120
121 MCAPI bool _initiateRamAttack();
122
123 MCAPI void _resetCooldown();
124
125 MCAPI void _tryKnockbackTarget();
126
127 MCAPI bool _verifyTargetStillInPositionAndPrepareForRamAttack();
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133 MCAPI void* $ctor(::Mob& mob);
134 // NOLINTEND
135
136public:
137 // destructor thunk
138 // NOLINTBEGIN
139 MCAPI void $dtor();
140 // NOLINTEND
141
142public:
143 // virtual function thunks
144 // NOLINTBEGIN
145 MCAPI void $start();
146
147 MCAPI void $stop();
148
149 MCAPI bool $canUse();
150
151 MCAPI bool $canContinueToUse();
152
153 MCAPI void $tick();
154
155 MCAPI void $appendDebugInfo(::std::string& str) const;
156
157
158 // NOLINTEND
159
160public:
161 // vftables
162 // NOLINTBEGIN
163 MCNAPI static void** $vftable();
164 // NOLINTEND
165};
Definition ActorDefinitionTrigger.h:14
Definition Goal.h:14
Definition Mob.h:51
Definition Path.h:16
Definition RamGoalItemDropperInterface.h:12
static MCAPI void ** $vftable()
Definition RamAttackGoal.h:47