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/util/FloatRange.h"
8#include "mc/util/json_util/JsonSchemaObjectNode.h"
9#include "mc/world/actor/ai/goal/BaseGoalDefinition.h"
10#include "mc/world/actor/ai/goal/Goal.h"
11#include "mc/world/level/BlockPos.h"
12#include "mc/world/level/Tick.h"
13#include "mc/world/phys/AABB.h"
14
15// auto generated forward declare list
16// clang-format off
17class ItemDescriptor;
18class Mob;
20namespace JsonUtil { class EmptyClass; }
21// clang-format on
22
23class JumpToBlockGoal : public ::Goal {
24public:
25 // JumpToBlockGoal inner types declare
26 // clang-format off
27 class Definition;
29 // clang-format on
30
31 // JumpToBlockGoal inner types define
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 4, int> mSearchWidth;
37 ::ll::TypedStorage<4, 4, int> mSearchHeight;
38 ::ll::TypedStorage<4, 4, int> mMinPathLength;
39 ::ll::TypedStorage<4, 4, int> mMinDistance;
40 ::ll::TypedStorage<4, 8, ::FloatRange> mCooldownTime;
41 ::ll::TypedStorage<4, 4, float> mScaleFactor;
42 ::ll::TypedStorage<4, 4, float> mMaxVelocity;
43 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mPreferredBlocks;
44 ::ll::TypedStorage<4, 4, float> mPreferredBlocksChance;
45 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mForbiddenBlocks;
46 // NOLINTEND
47
48 public:
49 // virtual functions
50 // NOLINTBEGIN
51 // vIndex: 0
52 virtual ~Definition() /*override*/;
53 // NOLINTEND
54
55 public:
56 // static functions
57 // NOLINTBEGIN
58 MCAPI static void buildSchema(
59 ::std::string const& name,
61 root
62 );
63 // NOLINTEND
64
65 public:
66 // destructor thunk
67 // NOLINTBEGIN
68 MCAPI void $dtor();
69 // NOLINTEND
70
71 public:
72 // vftables
73 // NOLINTBEGIN
74 MCNAPI static void** $vftable();
75 // NOLINTEND
76 };
77
78 enum class JumpState : uchar {
79 LookingForBlock = 0,
80 FaceJump = 1,
81 Jump = 2,
82 Airborne = 3,
83 Done = 4,
84 };
85
87 public:
88 // member variables
89 // NOLINTBEGIN
90 ::ll::TypedStorage<4, 12, ::BlockPos> targetPos;
91 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
92 ::ll::TypedStorage<4, 4, int> mWeight;
93 // NOLINTEND
94 };
95
96public:
97 // member variables
98 // NOLINTBEGIN
99 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
100 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
101 ::ll::TypedStorage<8, 8, ::Tick> mCooldownTimeout;
102 ::ll::TypedStorage<8, 8, ::Tick> mNextCandidateCheck;
103 ::ll::TypedStorage<4, 4, int> mCandidateAttemptCounter;
104 ::ll::TypedStorage<1, 1, ::JumpToBlockGoal::JumpState> mState;
105 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mJumpCurve;
106 ::ll::TypedStorage<4, 12, ::BlockPos> mTargetBlockPos;
107 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mCandidateBlocksPositions;
108 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
109 ::ll::TypedStorage<8, 24, ::std::vector<::JumpToBlockGoal::WeightedJumpToBlockPos>> mJumpableBlocksPositions;
110 ::ll::TypedStorage<4, 12, ::Vec3> mVelocityVector;
111 ::ll::TypedStorage<8, 8, ::Tick> mFaceJumpTimer;
112 ::ll::TypedStorage<8, 104, ::JumpToBlockGoal::Definition> mDefinition;
113 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
114 // NOLINTEND
115
116public:
117 // prevent constructor by default
118 JumpToBlockGoal& operator=(JumpToBlockGoal const&);
121
122public:
123 // virtual functions
124 // NOLINTBEGIN
125 // vIndex: 1
126 virtual bool canUse() /*override*/;
127
128 // vIndex: 2
129 virtual bool canContinueToUse() /*override*/;
130
131 // vIndex: 4
132 virtual void start() /*override*/;
133
134 // vIndex: 5
135 virtual void stop() /*override*/;
136
137 // vIndex: 6
138 virtual void tick() /*override*/;
139
140 // vIndex: 3
141 virtual bool canBeInterrupted() /*override*/;
142
143 // vIndex: 7
144 virtual void appendDebugInfo(::std::string& str) const /*override*/;
145
146 // vIndex: 0
147 virtual ~JumpToBlockGoal() /*override*/;
148 // NOLINTEND
149
150public:
151 // member functions
152 // NOLINTBEGIN
153 MCAPI explicit JumpToBlockGoal(::Mob& mob);
154
155 MCAPI void _clearGoalState();
156
157 MCAPI bool _findCandidateBlocks(::NavigationComponent& navigation);
158
159 MCAPI bool _findJumpableBlocks(bool useOnlyPreferredBlocksIfAny);
160
161 MCAPI bool _findTargetBlock();
162
163 MCAPI void resetCooldown();
164 // NOLINTEND
165
166public:
167 // constructor thunks
168 // NOLINTBEGIN
169 MCAPI void* $ctor(::Mob& mob);
170 // NOLINTEND
171
172public:
173 // destructor thunk
174 // NOLINTBEGIN
175 MCAPI void $dtor();
176 // NOLINTEND
177
178public:
179 // virtual function thunks
180 // NOLINTBEGIN
181 MCAPI bool $canUse();
182
183 MCAPI bool $canContinueToUse();
184
185 MCAPI void $start();
186
187 MCAPI void $stop();
188
189 MCAPI void $tick();
190
191 MCFOLD bool $canBeInterrupted();
192
193 MCAPI void $appendDebugInfo(::std::string& str) const;
194 // NOLINTEND
195
196public:
197 // vftables
198 // NOLINTBEGIN
199 MCNAPI static void** $vftable();
200 // NOLINTEND
201};
Definition BaseGoalDefinition.h:10
Definition Goal.h:14
Definition ItemDescriptor.h:22
Definition JsonSchemaObjectNode.h:8
Definition JumpToBlockGoal.h:32
static MCAPI void ** $vftable()
Definition JumpToBlockGoal.h:23
static MCAPI void ** $vftable()
Definition Mob.h:47
Definition NavigationComponent.h:22
Definition JumpToBlockGoal.h:86