LeviLamina
Loading...
Searching...
No Matches
JumpToBlockGoal.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/deps/shared_types/shared_types/FloatRange.h"
8#include "mc/world/actor/ai/goal/BaseGoal.h"
9#include "mc/world/level/BlockPos.h"
10#include "mc/world/level/Tick.h"
11#include "mc/world/phys/AABB.h"
12
13// auto generated forward declare list
14// clang-format off
15class ItemDescriptor;
16class Mob;
19// clang-format on
20
21class JumpToBlockGoal : public ::BaseGoal {
22public:
23 // JumpToBlockGoal inner types declare
24 // clang-format off
26 // clang-format on
27
28 // JumpToBlockGoal inner types define
29 enum class JumpState : uchar {
30 LookingForBlock = 0,
31 FaceJump = 1,
32 Jump = 2,
33 Airborne = 3,
34 Done = 4,
35 };
36
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<4, 12, ::BlockPos> targetPos;
42 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
43 ::ll::TypedStorage<4, 4, int> mWeight;
44 // NOLINTEND
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
51 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
52 ::ll::TypedStorage<8, 8, ::Tick> mCooldownTimeout;
53 ::ll::TypedStorage<8, 8, ::Tick> mNextCandidateCheck;
54 ::ll::TypedStorage<4, 4, int> mCandidateAttemptCounter;
55 ::ll::TypedStorage<1, 1, ::JumpToBlockGoal::JumpState> mState;
56 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mJumpCurve;
57 ::ll::TypedStorage<4, 12, ::BlockPos> mTargetBlockPos;
58 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mCandidateBlocksPositions;
59 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
60 ::ll::TypedStorage<8, 24, ::std::vector<::JumpToBlockGoal::WeightedJumpToBlockPos>> mJumpableBlocksPositions;
61 ::ll::TypedStorage<4, 12, ::Vec3> mVelocityVector;
62 ::ll::TypedStorage<8, 8, ::Tick> mFaceJumpTimer;
63 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
64 ::ll::TypedStorage<4, 4, int> mSearchWidth;
65 ::ll::TypedStorage<4, 4, int> mSearchHeight;
66 ::ll::TypedStorage<4, 4, int> mMinPathLength;
67 ::ll::TypedStorage<4, 4, int> mMinDistance;
68 ::ll::TypedStorage<4, 8, ::SharedTypes::FloatRange> mCooldownTime;
69 ::ll::TypedStorage<4, 4, float> mScaleFactor;
70 ::ll::TypedStorage<4, 4, float> mMaxVelocity;
71 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mPreferredBlocks;
72 ::ll::TypedStorage<4, 4, float> mPreferredBlocksChance;
73 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mForbiddenBlocks;
74 // NOLINTEND
75
76public:
77 // prevent constructor by default
78 JumpToBlockGoal& operator=(JumpToBlockGoal const&);
79 JumpToBlockGoal(JumpToBlockGoal const&);
80 JumpToBlockGoal();
81
82public:
83 // virtual functions
84 // NOLINTBEGIN
85 virtual bool canUse() /*override*/;
86
87 virtual bool canContinueToUse() /*override*/;
88
89 virtual void start() /*override*/;
90
91 virtual void stop() /*override*/;
92
93 virtual void tick() /*override*/;
94
95 virtual bool canBeInterrupted() /*override*/;
96
97 virtual void appendDebugInfo(::std::string& str) const /*override*/;
98 // NOLINTEND
99
100public:
101 // member functions
102 // NOLINTBEGIN
103 MCAPI explicit JumpToBlockGoal(::Mob& mob);
104
105 MCAPI void _clearGoalState();
106
107 MCAPI bool _findCandidateBlocks(::NavigationComponent& navigation);
108
109 MCAPI bool _findJumpableBlocks(bool useOnlyPreferredBlocksIfAny);
110
111 MCAPI bool _findTargetBlock();
112
113 MCAPI bool _turnToTarget(::MoveControlComponent const& moveControl) const;
114 // NOLINTEND
115
116public:
117 // constructor thunks
118 // NOLINTBEGIN
119 MCAPI void* $ctor(::Mob& mob);
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125 MCAPI bool $canUse();
126
127 MCAPI bool $canContinueToUse();
128
129 MCAPI void $start();
130
131 MCAPI void $stop();
132
133 MCAPI void $tick();
134
135 MCFOLD bool $canBeInterrupted();
136
137 MCAPI void $appendDebugInfo(::std::string& str) const;
138
139
140 // NOLINTEND
141
142public:
143 // vftables
144 // NOLINTBEGIN
145 MCNAPI static void** $vftable();
146 // NOLINTEND
147};
Definition BaseGoal.h:12
Definition ItemDescriptor.h:25
static MCAPI void ** $vftable()
Definition Mob.h:55
Definition MoveControlComponent.h:15
Definition NavigationComponent.h:18
Definition JumpToBlockGoal.h:37