LeviLamina
Loading...
Searching...
No Matches
RandomSearchAndDigGoal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/json_utils/JsonSchemaObjectNode.h"
7#include "mc/world/actor/ai/goal/BaseGoalDefinition.h"
8#include "mc/world/actor/ai/goal/Goal.h"
9
10// auto generated forward declare list
11// clang-format off
13class BlockDescriptor;
14class BlockPos;
15class BlockSource;
16class EntityContext;
17class ExpiringTick;
18class Mob;
19class Path;
20struct Tick;
21namespace JsonUtil { class EmptyClass; }
22// clang-format on
23
25public:
26 // RandomSearchAndDigGoal inner types declare
27 // clang-format off
28 class Definition;
29 // clang-format on
30
31 // RandomSearchAndDigGoal inner types define
33 public:
34 // member variables
35 // NOLINTBEGIN
54 // NOLINTEND
55
56 public:
57 // prevent constructor by default
58 Definition(Definition const&);
59
60 public:
61 // virtual functions
62 // NOLINTBEGIN
63 // vIndex: 0
64 virtual ~Definition() /*override*/;
65 // NOLINTEND
66
67 public:
68 // member functions
69 // NOLINTBEGIN
70 MCAPI Definition();
71
72 MCAPI void addBlockDescriptor(::BlockDescriptor const& blockDescriptor);
73
74 MCAPI void initialize(::EntityContext& entity, ::RandomSearchAndDigGoal& goal) const;
75
76 MCAPI ::RandomSearchAndDigGoal::Definition& operator=(::RandomSearchAndDigGoal::Definition const&);
77 // NOLINTEND
78
79 public:
80 // static functions
81 // NOLINTBEGIN
82 MCAPI static void buildSchema(
83 ::std::string const& name,
84 ::std::shared_ptr<
86 );
87 // NOLINTEND
88
89 public:
90 // constructor thunks
91 // NOLINTBEGIN
92 MCAPI void* $ctor();
93 // NOLINTEND
94
95 public:
96 // destructor thunk
97 // NOLINTBEGIN
98 MCAPI void $dtor();
99 // NOLINTEND
100
101 public:
102 // vftables
103 // NOLINTBEGIN
104 MCAPI static void** $vftable();
105 // NOLINTEND
106 };
107
108 enum class CanUseOutcome : int {
109 Ok = 0,
110 InCooldown = 1,
111 NoNavigation = 2,
112 CouldNotFindTargetPos = 3,
113 CouldNotCreatePath = 4,
114 CouldNotPathAllTheWay = 5,
115 };
116
117 enum class State : int {
118 Searching = 0,
119 Digging = 1,
120 Success = 2,
121 Done = 3,
122 };
123
124public:
125 // member variables
126 // NOLINTBEGIN
127 ::ll::TypedStorage<8, 776, ::RandomSearchAndDigGoal::Definition> mDefinition;
128 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
129 ::ll::TypedStorage<4, 4, ::RandomSearchAndDigGoal::State> mState;
130 ::ll::TypedStorage<4, 4, float> mGoalRadiusSqr;
131 ::ll::TypedStorage<1, 1, bool> mItemFound;
132 ::ll::TypedStorage<4, 12, ::BlockPos> mTargetPos;
133 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
134 ::ll::TypedStorage<2, 2, ushort> mCooldownDurationTicks;
135 ::ll::TypedStorage<2, 2, ushort> mDiggingDurationTicks;
136 ::ll::TypedStorage<2, 2, ushort> mSpawnItemAfterTicks;
137 ::ll::TypedStorage<8, 8, ::Tick> mCooldownEndTick;
138 ::ll::TypedStorage<8, 8, ::Tick> mItemFoundEndTick;
139 ::ll::TypedStorage<8, 8, ::Tick> mDiggingEndTick;
140 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mDiggingParticleCooldown;
141 // NOLINTEND
142
143public:
144 // virtual functions
145 // NOLINTBEGIN
146 // vIndex: 1
147 virtual bool canUse() /*override*/;
148
149 // vIndex: 2
150 virtual bool canContinueToUse() /*override*/;
151
152 // vIndex: 4
153 virtual void start() /*override*/;
154
155 // vIndex: 5
156 virtual void stop() /*override*/;
157
158 // vIndex: 6
159 virtual void tick() /*override*/;
160
161 // vIndex: 7
162 virtual void appendDebugInfo(::std::string& str) const /*override*/;
163
164 // vIndex: 0
165 virtual ~RandomSearchAndDigGoal() /*override*/ = default;
166 // NOLINTEND
167
168public:
169 // member functions
170 // NOLINTBEGIN
171 MCAPI ::RandomSearchAndDigGoal::CanUseOutcome _canUse();
172
173 MCAPI void _digUpItems();
174
175 MCAPI void _emitDiggingParticles();
176
177 MCAPI ::std::optional<::BlockPos> _findWantedTargetPos() const;
178
179 MCAPI bool _isValidTarget(::BlockSource const& region, ::BlockPos pos) const;
180
181 MCAPI void _triggerEvent(::ActorDefinitionTrigger const& eventTrigger) const;
182 // NOLINTEND
183
184public:
185 // destructor thunk
186 // NOLINTBEGIN
187
188 // NOLINTEND
189
190public:
191 // virtual function thunks
192 // NOLINTBEGIN
193 MCAPI bool $canUse();
194
195 MCAPI bool $canContinueToUse();
196
197 MCAPI void $start();
198
199 MCAPI void $stop();
200
201 MCAPI void $tick();
202
203 MCAPI void $appendDebugInfo(::std::string& str) const;
204 // NOLINTEND
205
206public:
207 // vftables
208 // NOLINTBEGIN
209 MCAPI static void** $vftable();
210 // NOLINTEND
211};
Definition ActorDefinitionTrigger.h:5
Definition BaseGoalDefinition.h:10
Definition BlockDescriptor.h:19
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition EntityContext.h:16
Definition ExpiringTick.h:5
Definition Goal.h:14
Definition JsonSchemaObjectNode.h:8
Definition Mob.h:47
Definition Path.h:16
Definition RandomSearchAndDigGoal.h:32
Definition RandomSearchAndDigGoal.h:24
Definition Tick.h:5
Definition Alias.h:14