25class JumpToBlockGoal :
public ::Goal {
34 enum class JumpState : uchar {
46 ::ll::TypedStorage<4, 4, int> mSearchWidth;
47 ::ll::TypedStorage<4, 4, int> mSearchHeight;
48 ::ll::TypedStorage<4, 4, int> mMinPathLength;
49 ::ll::TypedStorage<4, 4, int> mMinDistance;
50 ::ll::TypedStorage<4, 8, ::FloatRange> mCooldownTime;
51 ::ll::TypedStorage<4, 4, float> mScaleFactor;
52 ::ll::TypedStorage<4, 4, float> mMaxVelocity;
53 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mPreferredBlocks;
54 ::ll::TypedStorage<4, 4, float> mPreferredBlocksChance;
55 ::ll::TypedStorage<8, 24, ::std::vector<::ItemDescriptor>> mForbiddenBlocks;
67 MCAPI
void initialize(
::EntityContext& entity, ::JumpToBlockGoal& goal)
const;
73 MCAPI
static void buildSchema(
74 ::std::string
const& name,
97 ::ll::TypedStorage<4, 12, ::BlockPos> targetPos;
98 ::ll::TypedStorage<4, 12, ::Vec3> velocityVector;
99 ::ll::TypedStorage<4, 4, int> mWeight;
106 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
107 ::ll::TypedStorage<1, 1, bool> mDiscardFrictionDefault;
108 ::ll::TypedStorage<8, 8, ::Tick> mCooldownTimeout;
109 ::ll::TypedStorage<8, 8, ::Tick> mNextCandidateCheck;
110 ::ll::TypedStorage<4, 4, int> mCandidateAttemptCounter;
111 ::ll::TypedStorage<1, 1, ::JumpToBlockGoal::JumpState> mState;
112 ::ll::TypedStorage<8, 24, ::std::vector<::Vec3>> mJumpCurve;
113 ::ll::TypedStorage<4, 12, ::BlockPos> mTargetBlockPos;
114 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mCandidateBlocksPositions;
115 ::ll::TypedStorage<4, 12, ::BlockPos> mStartingPos;
116 ::ll::TypedStorage<8, 24, ::std::vector<::JumpToBlockGoal::WeightedJumpToBlockPos>> mJumpableBlocksPositions;
117 ::ll::TypedStorage<4, 12, ::Vec3> mVelocityVector;
118 ::ll::TypedStorage<8, 8, ::Tick> mFaceJumpTimer;
119 ::ll::TypedStorage<8, 104, ::JumpToBlockGoal::Definition> mDefinition;
120 ::ll::TypedStorage<4, 24, ::AABB const> mOriginalAabb;
125 JumpToBlockGoal& operator=(JumpToBlockGoal
const&);
126 JumpToBlockGoal(JumpToBlockGoal
const&);
132 virtual bool canUse() ;
134 virtual bool canContinueToUse() ;
136 virtual void start() ;
138 virtual void stop() ;
140 virtual void tick() ;
142 virtual bool canBeInterrupted() ;
144 virtual void appendDebugInfo(::std::string& str)
const ;
146 virtual ~JumpToBlockGoal() ;
152 MCAPI
explicit JumpToBlockGoal(
::Mob& mob);
154 MCAPI
void _clearGoalState();
158 MCAPI
bool _findJumpableBlocks(
bool useOnlyPreferredBlocksIfAny);
160 MCAPI
bool _findTargetBlock();
164 MCAPI
bool _isValidTargetBlock(
170 MCAPI
void resetCooldown();
176 MCAPI
void* $ctor(
::Mob& mob);
188 MCAPI
bool $canUse();
190 MCAPI
bool $canContinueToUse();
198 MCFOLD
bool $canBeInterrupted();
200 MCAPI
void $appendDebugInfo(::std::string& str)
const;
Definition EntityContext.h:16