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/deps/shared_types/shared_types/FloatRange.h"
8#include "mc/world/actor/ActorFilterGroup.h"
9#include "mc/world/actor/ai/goal/BaseGoal.h"
10#include "mc/world/level/BlockPos.h"
11#include "mc/world/level/Tick.h"
12#include "mc/world/phys/AABB.h"
13
14// auto generated forward declare list
15// clang-format off
16class Mob;
17// clang-format on
18
19class JumpAroundTargetGoal : public ::BaseGoal {
20public:
21 // JumpAroundTargetGoal inner types declare
22 // clang-format off
23 struct Jump;
24 // clang-format on
25
26 // JumpAroundTargetGoal inner types define
27 enum class State : int {
28 PrepareJump = 0,
29 Jumping = 1,
30 Done = 2,
31 };
32
33 struct Jump {
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<4, 12, ::Vec3> targetPosition;
38 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
39 // NOLINTEND
40 };
41
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 64, ::ActorFilterGroup> mFilters;
46 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
47 ::ll::TypedStorage<4, 4, int> mCooldownWhenHurtTicks;
48 ::ll::TypedStorage<4, 4, int> mLastHurtDurationTicks;
49 ::ll::TypedStorage<4, 4, float> mMaxJumpVelocity;
50 ::ll::TypedStorage<1, 1, bool> mCheckCollision;
51 ::ll::TypedStorage<4, 4, float> mBoundingBoxScaleFactor;
52 ::ll::TypedStorage<4, 4, int> mLineOfSightCheckHeight;
53 ::ll::TypedStorage<4, 8, ::SharedTypes::FloatRange> mDistanceToTargetSqrRange;
54 ::ll::TypedStorage<4, 4, int> mLandingPositionSpreadDegrees;
55 ::ll::TypedStorage<4, 8, ::SharedTypes::FloatRange> mDistanceFromTargetLandingPosition;
56 ::ll::TypedStorage<4, 4, int> mRequiredAirBlocksAbove;
57 ::ll::TypedStorage<4, 4, int> mSnapToSurfaceBlockRange;
58 ::ll::TypedStorage<8, 24, ::std::vector<float>> mAllowedJumpAngles;
59 ::ll::TypedStorage<4, 4, int> mJumpFromWaterTimeoutTicks;
60 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
61 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
62 ::ll::TypedStorage<8, 8, ::Tick> mJumpedFromWaterEndTick;
63 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
64 ::ll::TypedStorage<4, 4, ::JumpAroundTargetGoal::State> mState;
65 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
66 ::ll::TypedStorage<8, 8, ::Tick> mGoalStartTick;
67 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
68 ::ll::TypedStorage<4, 28, ::std::optional<::JumpAroundTargetGoal::Jump>> mJumpData;
69 ::ll::TypedStorage<8, 8, uint64> mPrepareJumpDurationTicks;
70 // NOLINTEND
71
72public:
73 // prevent constructor by default
74 JumpAroundTargetGoal& operator=(JumpAroundTargetGoal const&);
75 JumpAroundTargetGoal(JumpAroundTargetGoal const&);
76 JumpAroundTargetGoal();
77
78public:
79 // virtual functions
80 // NOLINTBEGIN
81 virtual bool canUse() /*override*/;
82
83 virtual bool canContinueToUse() /*override*/;
84
85 virtual void start() /*override*/;
86
87 virtual void stop() /*override*/;
88
89 virtual void tick() /*override*/;
90
91 virtual bool canBeInterrupted() /*override*/;
92
93 virtual void appendDebugInfo(::std::string& str) const /*override*/;
94 // NOLINTEND
95
96public:
97 // member functions
98 // NOLINTBEGIN
99 MCAPI explicit JumpAroundTargetGoal(::Mob& mob);
100
101 MCAPI ::std::optional<::JumpAroundTargetGoal::Jump> _calculateOptimalJumpVector(::Vec3 const& targetPosition) const;
102
103 MCAPI bool _canJumpFromCurrentPosition() const;
104
105 MCAPI void _jump() const;
106
107 MCAPI ::std::optional<::BlockPos> _snapToSurface(::Vec3 const& targetPosition) const;
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(::Mob& mob);
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI bool $canUse();
120
121 MCAPI bool $canContinueToUse();
122
123 MCAPI void $start();
124
125 MCAPI void $stop();
126
127 MCAPI void $tick();
128
129 MCFOLD bool $canBeInterrupted();
130
131 MCAPI void $appendDebugInfo(::std::string& str) const;
132
133
134 // NOLINTEND
135
136public:
137 // vftables
138 // NOLINTBEGIN
139 MCNAPI static void** $vftable();
140 // NOLINTEND
141};
static MCAPI void ** $vftable()
Definition Mob.h:57
Definition Vec3.h:10
Definition JumpAroundTargetGoal.h:33