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/Goal.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 ::Goal {
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> mSpeedMod;
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&, ::BlockPos const&) = 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 ~BaseMoveToGoal() /*override*/ = default;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI void _checkIfStuck();
78 // NOLINTEND
79
80public:
81 // virtual function thunks
82 // NOLINTBEGIN
83 MCAPI bool $canUse();
84
85 MCAPI bool $canContinueToUse();
86
87 MCAPI void $start();
88
89 MCFOLD void $stop();
90
91 MCAPI void $tick();
92
93 MCAPI bool $hasReachedTarget() const;
94
95 MCAPI int $_nextStartTick();
96
97 MCAPI bool $_canReach(::BlockPos const& pos);
98
99 MCAPI ::Vec3 $_getTargetPosition() const;
100
101 MCFOLD uint64 $_getRepathTime() const;
102
103
104 // NOLINTEND
105
106public:
107 // vftables
108 // NOLINTBEGIN
109 MCAPI static void** $vftable();
110 // NOLINTEND
111};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Goal.h:14
Definition Mob.h:50