20class RandomSearchAndDigGoal :
public ::Goal {
23 enum class CanUseOutcome :
int {
27 CouldNotFindTargetPos = 3,
28 CouldNotCreatePath = 4,
29 CouldNotPathAllTheWay = 5,
32 enum class State :
int {
42 ::ll::TypedStorage<4, 4, float> mSpeedMod;
43 ::ll::TypedStorage<4, 4, float> mGoalRadius;
44 ::ll::TypedStorage<4, 4, float> mDigSpawnItemPosOffset;
45 ::ll::TypedStorage<4, 4, float> mDigSpawnItemAfterSeconds;
46 ::ll::TypedStorage<4, 4, float> mTargetDigPositionOffset;
47 ::ll::TypedStorage<4, 4, int> mFindWantedPosRetries;
48 ::ll::TypedStorage<4, 4, int> mSearchRangeXZ;
49 ::ll::TypedStorage<4, 4, int> mSearchRangeY;
50 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnSearchingStartEvent;
51 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnFailDuringSearchingEvent;
52 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnDiggingStartEvent;
53 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnItemFoundEvent;
54 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnFailDuringDiggingEvent;
55 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnSuccessEvent;
56 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mTargetBlocks;
57 ::ll::TypedStorage<8, 32, ::std::string> mItemTable;
58 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
59 ::ll::TypedStorage<4, 4, ::RandomSearchAndDigGoal::State> mState;
60 ::ll::TypedStorage<4, 4, float> mGoalRadiusSqr;
61 ::ll::TypedStorage<1, 1, bool> mItemFound;
62 ::ll::TypedStorage<4, 12, ::BlockPos> mTargetPos;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
64 ::ll::TypedStorage<2, 2, ushort> mCooldownDurationTicks;
65 ::ll::TypedStorage<2, 2, ushort> mDiggingDurationTicks;
66 ::ll::TypedStorage<2, 2, ushort> mSpawnItemAfterTicks;
67 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
68 ::ll::TypedStorage<8, 8, ::Tick> mItemFoundEndTick;
69 ::ll::TypedStorage<8, 8, ::Tick> mDiggingEndTick;
70 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mDiggingParticleCooldown;
75 RandomSearchAndDigGoal& operator=(RandomSearchAndDigGoal
const&);
76 RandomSearchAndDigGoal(RandomSearchAndDigGoal
const&);
77 RandomSearchAndDigGoal();
82 virtual bool canUse() ;
84 virtual bool canContinueToUse() ;
86 virtual void start() ;
92 virtual void appendDebugInfo(::std::string& str)
const ;
94 virtual ~RandomSearchAndDigGoal() ;
100 MCAPI
explicit RandomSearchAndDigGoal(
::Mob& mob);
102 MCAPI ::RandomSearchAndDigGoal::CanUseOutcome _canUse();
104 MCAPI
void _digUpItems();
106 MCAPI
void _emitDiggingParticles();
108 MCAPI ::std::optional<::BlockPos> _findWantedTargetPos()
const;
118 MCAPI
void* $ctor(
::Mob& mob);
130 MCAPI
bool $canUse();
132 MCAPI
bool $canContinueToUse();
140 MCAPI
void $appendDebugInfo(::std::string& str)
const;