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