Skip to content
LeviMC
English
AutoLightDark
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;
14struct GoalId;
15// clang-format on
16
17class BaseMoveToGoal : public ::BaseGoal {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<4, 4, int> mTravelTicks;
22 ::ll::TypedStorage<4, 4, int> mNextStartTick;
23 ::ll::TypedStorage<4, 4, int> mGiveUpTicks;
24 ::ll::TypedStorage<4, 4, int> mStayTicks;
25 ::ll::TypedStorage<4, 4, int> mMaxStayTicks;
26 ::ll::TypedStorage<1, 1, bool> mReachedTarget;
27 ::ll::TypedStorage<4, 4, float> mSpeedMultiplier;
28 ::ll::TypedStorage<4, 4, float> mGoalRadiusSq;
29 ::ll::TypedStorage<8, 8, uint64> mCooldownCounter;
30 ::ll::TypedStorage<8, 8, uint64> mCooldownTimeoutTime;
31 ::ll::TypedStorage<4, 12, ::BlockPos> mStartPos;
32 ::ll::TypedStorage<4, 12, ::Vec3> mBlockPos;
33 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPositionOffset;
34 ::ll::TypedStorage<4, 4, float> mChanceToStart;
35 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
36 ::ll::TypedStorage<4, 4, int> mInterval;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 BaseMoveToGoal& operator=(BaseMoveToGoal const&);
42 BaseMoveToGoal(BaseMoveToGoal const&);
43 BaseMoveToGoal();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual bool canUse() /*override*/;
49
50 virtual bool canContinueToUse() /*override*/;
51
52 virtual void start() /*override*/;
53
54 virtual void stop() /*override*/;
55
56 virtual void tick() /*override*/;
57
58 virtual bool hasReachedTarget() const;
59
60 virtual bool isValidTarget(::BlockSource& region, ::BlockPos const& pos) = 0;
61
62 virtual int _nextStartTick();
63
64 virtual bool _canReach(::BlockPos const& pos);
65
66 virtual void _moveToBlock() = 0;
67
68 virtual ::Vec3 _getTargetPosition() const;
69
70 virtual uint64 _getRepathTime() const;
71
72 virtual void setInterval(int const interval);
73 // NOLINTEND
74
75public:
76 // member functions
77 // NOLINTBEGIN
79 ::Mob& mob,
80 ::std::string name,
81 ::GoalId const& goalId,
82 float speedMultiplier,
83 float cooldownTimeout,
84 float goalRadius
85 );
86 // NOLINTEND
87
88public:
89 // constructor thunks
90 // NOLINTBEGIN
91 MCNAPI void* $ctor(
92 ::Mob& mob,
93 ::std::string name,
94 ::GoalId const& goalId,
95 float speedMultiplier,
96 float cooldownTimeout,
97 float goalRadius
98 );
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104 MCNAPI bool $canUse();
105
106 MCNAPI bool $canContinueToUse();
107
108 MCNAPI void $start();
109
110 MCNAPI void $stop();
111
112 MCNAPI void $tick();
113
114 MCNAPI bool $hasReachedTarget() const;
115
116 MCNAPI int $_nextStartTick();
117
118 MCNAPI bool $_canReach(::BlockPos const& pos);
119
120 MCNAPI ::Vec3 $_getTargetPosition() const;
121
122 MCNAPI uint64 $_getRepathTime() const;
123
124 MCNAPI void $setInterval(int const interval);
125
126
127 // NOLINTEND
128
129public:
130 // vftables
131 // NOLINTBEGIN
132 MCNAPI static void** $vftable();
133 // NOLINTEND
134};
Definition BaseGoal.h:12
MCAPI void $stop()
MCAPI BaseMoveToGoal(::Mob &mob, ::std::string name, ::GoalId const &goalId, float speedMultiplier, float cooldownTimeout, float goalRadius)
MCAPI void * $ctor(::Mob &mob, ::std::string name, ::GoalId const &goalId, float speedMultiplier, float cooldownTimeout, float goalRadius)
MCAPI int $_nextStartTick()
MCAPI bool $canUse()
MCAPI bool $canContinueToUse()
static MCAPI void ** $vftable()
MCAPI bool $_canReach(::BlockPos const &pos)
MCAPI void $tick()
MCAPI void $start()
MCAPI bool $hasReachedTarget() const
MCAPI void $setInterval(int const interval)
MCAPI::Vec3 $_getTargetPosition() const
MCAPI uint64 $_getRepathTime() const
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Mob.h:58
Definition GoalId.h:5