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