LeviLamina
Loading...
Searching...
No Matches
JumpAroundTargetGoal.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/ActorFilterGroup.h"
10#include "mc/world/actor/ai/goal/BaseGoalDefinition.h"
11#include "mc/world/actor/ai/goal/Goal.h"
12#include "mc/world/level/BlockPos.h"
13#include "mc/world/level/Tick.h"
14#include "mc/world/phys/AABB.h"
15
16// auto generated forward declare list
17// clang-format off
18class Mob;
19namespace JsonUtil { class EmptyClass; }
20// clang-format on
21
23public:
24 // JumpAroundTargetGoal inner types declare
25 // clang-format off
26 class Definition;
27 struct Jump;
28 // clang-format on
29
30 // JumpAroundTargetGoal inner types define
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
36 ::ll::TypedStorage<4, 4, float> mCooldownSeconds;
37 ::ll::TypedStorage<4, 4, float> mCooldownWhenHurtSeconds;
38 ::ll::TypedStorage<4, 4, float> mLastHurtDurationSeconds;
39 ::ll::TypedStorage<4, 4, float> mPrepareJumpDurationSeconds;
40 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
41 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
42 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
43 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
44 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceToTargetRange;
45 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
46 ::ll::TypedStorage<4, 8, ::FloatRange> mLandingPositionRange;
47 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
48 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
49 ::ll::TypedStorage<4, 4, float> mJumpingFromWaterTimeoutSeconds;
50 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
51 // NOLINTEND
52
53 public:
54 // virtual functions
55 // NOLINTBEGIN
56 // vIndex: 0
57 virtual ~Definition() /*override*/ = default;
58 // NOLINTEND
59
60 public:
61 // static functions
62 // NOLINTBEGIN
63 MCAPI static void buildSchema(
64 ::std::string const& name,
65 ::std::shared_ptr<
67 );
68 // NOLINTEND
69
70 public:
71 // vftables
72 // NOLINTBEGIN
73 MCNAPI static void** $vftable();
74 // NOLINTEND
75 };
76
77 enum class State : int {
78 PrepareJump = 0,
79 Jumping = 1,
80 Done = 2,
81 };
82
83 struct Jump {
84 public:
85 // member variables
86 // NOLINTBEGIN
87 ::ll::TypedStorage<4, 12, ::Vec3> targetPosition;
88 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
89 // NOLINTEND
90 };
91
92public:
93 // member variables
94 // NOLINTBEGIN
95 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
96 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
97 ::ll::TypedStorage<4, 4, int> mCooldownWhenHurtTicks;
98 ::ll::TypedStorage<4, 4, int> mLastHurtDurationTicks;
99 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
100 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
101 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
102 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
103 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceToTargetSqrRange;
104 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
105 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceFromTargetLandingPosition;
106 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
107 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
108 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
109 ::ll::TypedStorage<4, 4, int> mJumpFromWaterTimeoutTicks;
110 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
111 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
112 ::ll::TypedStorage<8, 8, ::Tick> mJumpedFromWaterEndTick;
113 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
114 ::ll::TypedStorage<4, 4, ::JumpAroundTargetGoal::State> mState;
115 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
116 ::ll::TypedStorage<8, 8, ::Tick> mGoalStartTick;
117 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
118 ::ll::TypedStorage<4, 28, ::std::optional<::JumpAroundTargetGoal::Jump>> mJumpData;
119 ::ll::TypedStorage<8, 8, uint64> mPrepareJumpDurationTicks;
120 // NOLINTEND
121
122public:
123 // prevent constructor by default
127
128public:
129 // virtual functions
130 // NOLINTBEGIN
131 // vIndex: 1
132 virtual bool canUse() /*override*/;
133
134 // vIndex: 2
135 virtual bool canContinueToUse() /*override*/;
136
137 // vIndex: 4
138 virtual void start() /*override*/;
139
140 // vIndex: 5
141 virtual void stop() /*override*/;
142
143 // vIndex: 6
144 virtual void tick() /*override*/;
145
146 // vIndex: 3
147 virtual bool canBeInterrupted() /*override*/;
148
149 // vIndex: 7
150 virtual void appendDebugInfo(::std::string& str) const /*override*/;
151
152 // vIndex: 0
153 virtual ~JumpAroundTargetGoal() /*override*/ = default;
154 // NOLINTEND
155
156public:
157 // member functions
158 // NOLINTBEGIN
159 MCAPI explicit JumpAroundTargetGoal(::Mob& mob);
160
161 MCAPI ::std::optional<::JumpAroundTargetGoal::Jump> _calculateOptimalJumpVector(::Vec3 const& targetPosition) const;
162
163 MCAPI bool _canJumpFromCurrentPosition() const;
164
165 MCAPI void _jump() const;
166
167 MCAPI void _postJumpCleanup() const;
168
169 MCAPI ::std::optional<::BlockPos> _snapToSurface(::Vec3 const& targetPosition) const;
170 // NOLINTEND
171
172public:
173 // constructor thunks
174 // NOLINTBEGIN
175 MCAPI void* $ctor(::Mob& mob);
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 JsonSchemaObjectNode.h:8
Definition JumpAroundTargetGoal.h:31
static MCAPI void ** $vftable()
Definition JumpAroundTargetGoal.h:22
static MCAPI void ** $vftable()
Definition Mob.h:47
Definition Vec3.h:10
Definition JumpAroundTargetGoal.h:83