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/util/FloatRange.h"
7#include "mc/util/json_util/JsonSchemaObjectNode.h"
8#include "mc/world/actor/ActorFilterGroup.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 Mob;
18class Vec3;
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
51 // NOLINTEND
52
53 public:
54 // prevent constructor by default
55 Definition& operator=(Definition const&);
56 Definition(Definition const&);
57 Definition();
58
59 public:
60 // virtual functions
61 // NOLINTBEGIN
62 // vIndex: 0
63 virtual ~Definition() /*override*/ = default;
64 // NOLINTEND
65
66 public:
67 // static functions
68 // NOLINTBEGIN
69 MCNAPI static void buildSchema(
70 ::std::string const& name,
71 ::std::shared_ptr<
73 );
74 // NOLINTEND
75
76 public:
77 // vftables
78 // NOLINTBEGIN
79 MCNAPI static void** $vftable();
80 // NOLINTEND
81 };
82
83 enum class State : int {
84 PrepareJump = 0,
85 Jumping = 1,
86 Done = 2,
87 };
88
89 struct Jump {
90 public:
91 // member variables
92 // NOLINTBEGIN
95 // NOLINTEND
96
97 public:
98 // prevent constructor by default
99 Jump& operator=(Jump const&);
100 Jump(Jump const&);
101 Jump();
102 };
103
104public:
105 // member variables
106 // NOLINTBEGIN
107 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
108 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
109 ::ll::TypedStorage<4, 4, int> mCooldownWhenHurtTicks;
110 ::ll::TypedStorage<4, 4, int> mLastHurtDurationTicks;
111 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
112 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
113 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
114 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
115 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceToTargetSqrRange;
116 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
117 ::ll::TypedStorage<4, 8, ::FloatRange> mDistanceFromTargetLandingPosition;
118 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
119 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
120 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
121 ::ll::TypedStorage<4, 4, int> mJumpFromWaterTimeoutTicks;
122 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
123 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
124 ::ll::TypedStorage<8, 8, ::Tick> mJumpedFromWaterEndTick;
125 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
126 ::ll::TypedStorage<4, 4, ::JumpAroundTargetGoal::State> mState;
127 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
128 ::ll::TypedStorage<8, 8, ::Tick> mGoalStartTick;
129 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
130 ::ll::TypedStorage<4, 28, ::std::optional<::JumpAroundTargetGoal::Jump>> mJumpData;
131 ::ll::TypedStorage<8, 8, uint64> mPrepareJumpDurationTicks;
132 // NOLINTEND
133
134public:
135 // prevent constructor by default
139
140public:
141 // virtual functions
142 // NOLINTBEGIN
143 // vIndex: 1
144 virtual bool canUse() /*override*/;
145
146 // vIndex: 2
147 virtual bool canContinueToUse() /*override*/;
148
149 // vIndex: 4
150 virtual void start() /*override*/;
151
152 // vIndex: 5
153 virtual void stop() /*override*/;
154
155 // vIndex: 6
156 virtual void tick() /*override*/;
157
158 // vIndex: 3
159 virtual bool canBeInterrupted() /*override*/;
160
161 // vIndex: 7
162 virtual void appendDebugInfo(::std::string& str) const /*override*/;
163
164 // vIndex: 0
165 virtual ~JumpAroundTargetGoal() /*override*/ = default;
166 // NOLINTEND
167
168public:
169 // member functions
170 // NOLINTBEGIN
171 MCNAPI explicit JumpAroundTargetGoal(::Mob& mob);
172
173 MCNAPI ::std::optional<::JumpAroundTargetGoal::Jump>
174 _calculateOptimalJumpVector(::Vec3 const& targetPosition) const;
175
176 MCNAPI bool _canJumpFromCurrentPosition() const;
177
178 MCNAPI void _jump() const;
179
180 MCNAPI void _postJumpCleanup() const;
181
182 MCNAPI ::std::optional<::BlockPos> _snapToSurface(::Vec3 const& targetPosition) const;
183 // NOLINTEND
184
185public:
186 // constructor thunks
187 // NOLINTBEGIN
188 MCNAPI void* $ctor(::Mob& mob);
189 // NOLINTEND
190
191public:
192 // virtual function thunks
193 // NOLINTBEGIN
194 MCNAPI bool $canUse();
195
196 MCNAPI bool $canContinueToUse();
197
198 MCNAPI void $start();
199
200 MCNAPI void $stop();
201
202 MCNAPI void $tick();
203
204 MCNAPI bool $canBeInterrupted();
205
206 MCNAPI void $appendDebugInfo(::std::string& str) const;
207 // NOLINTEND
208
209public:
210 // vftables
211 // NOLINTBEGIN
212 MCNAPI static void** $vftable();
213 // NOLINTEND
214};
Definition BaseGoalDefinition.h:10
Definition Goal.h:14
Definition JsonSchemaObjectNode.h:8
Definition JumpAroundTargetGoal.h:31
static MCAPI void ** $vftable()
static MCAPI void buildSchema(::std::string const &name, ::std::shared_ptr< ::JsonUtil::JsonSchemaObjectNode<::JsonUtil::EmptyClass, ::JumpAroundTargetGoal::Definition > > &root)
Definition JumpAroundTargetGoal.h:22
MCAPI void * $ctor(::Mob &mob)
MCAPI bool _canJumpFromCurrentPosition() const
MCAPI ::std::optional<::JumpAroundTargetGoal::Jump > _calculateOptimalJumpVector(::Vec3 const &targetPosition) const
MCAPI void $appendDebugInfo(::std::string &str) const
MCAPI void _postJumpCleanup() const
MCAPI void $start()
MCAPI void _jump() const
static MCAPI void ** $vftable()
MCAPI bool $canBeInterrupted()
MCAPI void $stop()
MCAPI bool $canContinueToUse()
MCAPI JumpAroundTargetGoal(::Mob &mob)
MCAPI bool $canUse()
MCAPI ::std::optional<::BlockPos > _snapToSurface(::Vec3 const &targetPosition) const
MCAPI void $tick()
Definition Mob.h:47
Definition Vec3.h:10
Definition JumpAroundTargetGoal.h:89
Definition Alias.h:14