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