Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI JumpAroundTargetGoal(::Mob& mob, ::std::string name, ::GoalId const& goalId);
101
102 MCNAPI ::std::optional<::JumpAroundTargetGoal::Jump>
103 _calculateOptimalJumpVector(::Vec3 const& targetPosition) const;
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCNAPI void* $ctor(::Mob& mob, ::std::string name, ::GoalId const& goalId);
110 // NOLINTEND
111
112public:
113 // virtual function thunks
114 // NOLINTBEGIN
115 MCNAPI bool $canUse();
116
117 MCNAPI bool $canContinueToUse();
118
119 MCNAPI void $start();
120
121 MCNAPI void $stop();
122
123 MCNAPI void $tick();
124
125 MCNAPI bool $canBeInterrupted();
126
127 MCNAPI void $appendDebugInfo(::std::string& str) const;
128
129
130 // NOLINTEND
131};
Definition BaseGoal.h:12
MCAPI JumpAroundTargetGoal(::Mob &mob, ::std::string name, ::GoalId const &goalId)
MCAPI ::std::optional<::JumpAroundTargetGoal::Jump > _calculateOptimalJumpVector(::Vec3 const &targetPosition) const
MCAPI void $appendDebugInfo(::std::string &str) const
MCAPI void * $ctor(::Mob &mob, ::std::string name, ::GoalId const &goalId)
MCAPI void $start()
MCAPI bool $canBeInterrupted()
MCAPI void $stop()
MCAPI bool $canContinueToUse()
MCAPI bool $canUse()
MCAPI void $tick()
Definition Mob.h:58
Definition Vec3.h:10
Definition GoalId.h:5
Definition JumpAroundTargetGoal.h:34