LeviLamina
Loading...
Searching...
No Matches
BaseMoveToGoal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/world/actor/ai/goal/BaseGoal.h"
8#include "mc/world/level/BlockPos.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockSource;
13class Mob;
14// clang-format on
15
16class BaseMoveToGoal : public ::BaseGoal {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<4, 4, int> mTravelTicks;
21 ::ll::TypedStorage<4, 4, int> mNextStartTick;
22 ::ll::TypedStorage<4, 4, int> mGiveUpTicks;
23 ::ll::TypedStorage<4, 4, int> mStayTicks;
24 ::ll::TypedStorage<4, 4, int> mMaxStayTicks;
25 ::ll::TypedStorage<1, 1, bool> mReachedTarget;
26 ::ll::TypedStorage<4, 4, float> mSpeedMultiplier;
27 ::ll::TypedStorage<4, 4, float> mGoalRadiusSq;
28 ::ll::TypedStorage<8, 8, uint64> mCooldownCounter;
29 ::ll::TypedStorage<8, 8, uint64> mCooldownTimeoutTime;
30 ::ll::TypedStorage<4, 12, ::BlockPos> mStartPos;
31 ::ll::TypedStorage<4, 12, ::Vec3> mBlockPos;
32 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPositionOffset;
33 ::ll::TypedStorage<4, 4, float> mChanceToStart;
34 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
35 ::ll::TypedStorage<4, 4, int> mInterval;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 BaseMoveToGoal& operator=(BaseMoveToGoal const&);
41 BaseMoveToGoal(BaseMoveToGoal const&);
42 BaseMoveToGoal();
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual bool canUse() /*override*/;
48
49 virtual bool canContinueToUse() /*override*/;
50
51 virtual void start() /*override*/;
52
53 virtual void stop() /*override*/;
54
55 virtual void tick() /*override*/;
56
57 virtual bool hasReachedTarget() const;
58
59 virtual bool isValidTarget(::BlockSource& region, ::BlockPos const& pos) = 0;
60
61 virtual int _nextStartTick();
62
63 virtual bool _canReach(::BlockPos const& pos);
64
65 virtual void _moveToBlock() = 0;
66
67 virtual ::Vec3 _getTargetPosition() const;
68
69 virtual uint64 _getRepathTime() const;
70
71 virtual void setInterval(int const interval);
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI BaseMoveToGoal(::Mob& mob, float speedMultiplier, float cooldownTimeout, float goalRadius);
78
79 MCAPI ::BlockPos _blockAboveTarget() const;
80
81 MCAPI void _checkIfStuck();
82
83 MCFOLD bool _isCooldownActive() const;
84
85 MCAPI void setTargetPositionOffset(::Vec3 const& offset);
86 // NOLINTEND
87
88public:
89 // constructor thunks
90 // NOLINTBEGIN
91 MCAPI void* $ctor(::Mob& mob, float speedMultiplier, float cooldownTimeout, float goalRadius);
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCAPI bool $canUse();
98
99 MCAPI bool $canContinueToUse();
100
101 MCAPI void $start();
102
103 MCAPI void $stop();
104
105 MCAPI void $tick();
106
107 MCFOLD bool $hasReachedTarget() const;
108
109 MCAPI int $_nextStartTick();
110
111 MCAPI bool $_canReach(::BlockPos const& pos);
112
113 MCAPI ::Vec3 $_getTargetPosition() const;
114
115 MCFOLD uint64 $_getRepathTime() const;
116
117 MCFOLD void $setInterval(int const interval);
118
119
120 // NOLINTEND
121
122public:
123 // vftables
124 // NOLINTBEGIN
125 MCAPI static void** $vftable();
126 // NOLINTEND
127};
static MCAPI void ** $vftable()
Definition BlockPos.h:21
Definition BlockSource.h:72
Definition Mob.h:56
Definition Vec3.h:10