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
22class JumpAroundTargetGoal : public ::Goal {
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
31 enum class State : int {
32 PrepareJump = 0,
33 Jumping = 1,
34 Done = 2,
35 };
36
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
42 ::ll::TypedStorage<4, 4, float> mCooldownSeconds;
43 ::ll::TypedStorage<4, 4, float> mCooldownWhenHurtSeconds;
44 ::ll::TypedStorage<4, 4, float> mLastHurtDurationSeconds;
45 ::ll::TypedStorage<4, 4, float> mPrepareJumpDurationSeconds;
46 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
47 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
48 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
49 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
50 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceToTargetRange;
51 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
52 ::ll::TypedStorage<4, 8, ::FloatRange> mLandingPositionRange;
53 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
54 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
55 ::ll::TypedStorage<4, 4, float> mJumpingFromWaterTimeoutSeconds;
56 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
57 // NOLINTEND
58
59 public:
60 // virtual functions
61 // NOLINTBEGIN
62 virtual ~Definition() /*override*/ = default;
63 // NOLINTEND
64
65 public:
66 // static functions
67 // NOLINTBEGIN
68 MCAPI static void buildSchema(
69 ::std::string const& name,
70 ::std::shared_ptr<
72 );
73 // NOLINTEND
74
75 public:
76 // vftables
77 // NOLINTBEGIN
78 MCNAPI static void** $vftable();
79 // NOLINTEND
80 };
81
82 struct Jump {
83 public:
84 // member variables
85 // NOLINTBEGIN
86 ::ll::TypedStorage<4, 12, ::Vec3> targetPosition;
87 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
88 // NOLINTEND
89 };
90
91public:
92 // member variables
93 // NOLINTBEGIN
94 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
95 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
96 ::ll::TypedStorage<4, 4, int> mCooldownWhenHurtTicks;
97 ::ll::TypedStorage<4, 4, int> mLastHurtDurationTicks;
98 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
99 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
100 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
101 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
102 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceToTargetSqrRange;
103 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
104 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceFromTargetLandingPosition;
105 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
106 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
107 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
108 ::ll::TypedStorage<4, 4, int> mJumpFromWaterTimeoutTicks;
109 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
110 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
111 ::ll::TypedStorage<8, 8, ::Tick> mJumpedFromWaterEndTick;
112 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
113 ::ll::TypedStorage<4, 4, ::JumpAroundTargetGoal::State> mState;
114 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
115 ::ll::TypedStorage<8, 8, ::Tick> mGoalStartTick;
116 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
117 ::ll::TypedStorage<4, 28, ::std::optional<::JumpAroundTargetGoal::Jump>> mJumpData;
118 ::ll::TypedStorage<8, 8, uint64> mPrepareJumpDurationTicks;
119 // NOLINTEND
120
121public:
122 // prevent constructor by default
123 JumpAroundTargetGoal& operator=(JumpAroundTargetGoal const&);
124 JumpAroundTargetGoal(JumpAroundTargetGoal const&);
125 JumpAroundTargetGoal();
126
127public:
128 // virtual functions
129 // NOLINTBEGIN
130 virtual bool canUse() /*override*/;
131
132 virtual bool canContinueToUse() /*override*/;
133
134 virtual void start() /*override*/;
135
136 virtual void stop() /*override*/;
137
138 virtual void tick() /*override*/;
139
140 virtual bool canBeInterrupted() /*override*/;
141
142 virtual void appendDebugInfo(::std::string& str) const /*override*/;
143
144 virtual ~JumpAroundTargetGoal() /*override*/ = default;
145 // NOLINTEND
146
147public:
148 // member functions
149 // NOLINTBEGIN
150 MCAPI explicit JumpAroundTargetGoal(::Mob& mob);
151
152 MCAPI ::std::optional<::JumpAroundTargetGoal::Jump> _calculateOptimalJumpVector(::Vec3 const& targetPosition) const;
153
154 MCAPI bool _canJumpFromCurrentPosition() const;
155
156 MCAPI void _jump() const;
157
158 MCAPI ::std::optional<::BlockPos> _snapToSurface(::Vec3 const& targetPosition) const;
159 // NOLINTEND
160
161public:
162 // constructor thunks
163 // NOLINTBEGIN
164 MCAPI void* $ctor(::Mob& mob);
165 // NOLINTEND
166
167public:
168 // virtual function thunks
169 // NOLINTBEGIN
170 MCAPI bool $canUse();
171
172 MCAPI bool $canContinueToUse();
173
174 MCAPI void $start();
175
176 MCAPI void $stop();
177
178 MCAPI void $tick();
179
180 MCFOLD bool $canBeInterrupted();
181
182 MCAPI void $appendDebugInfo(::std::string& str) const;
183
184
185 // NOLINTEND
186
187public:
188 // vftables
189 // NOLINTBEGIN
190 MCNAPI static void** $vftable();
191 // NOLINTEND
192};
Definition BaseGoalDefinition.h:10
Definition Goal.h:14
Definition EmptyClass.h:7
Definition JsonSchemaObjectNode.h:8
Definition JumpAroundTargetGoal.h:37
static MCAPI void ** $vftable()
static MCAPI void ** $vftable()
Definition Mob.h:50
Definition Vec3.h:10
Definition JumpAroundTargetGoal.h:82