LeviLamina
Loading...
Searching...
No Matches
StructurePoolElement.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/platform/threading/Mutex.h"
8#include "mc/util/Rotation.h"
9#include "mc/world/level/levelgen/structure/PostProcessSettings.h"
10#include "mc/world/level/levelgen/structure/Projection.h"
11#include "mc/world/level/levelgen/structure/structurepools/JigsawReplacement.h"
12#include "mc/world/level/levelgen/structure/structurepools/StructurePoolElementSettings.h"
13#include "mc/world/level/levelgen/structure/structurepools/StructurePoolElementType.h"
14
15// auto generated forward declare list
16// clang-format off
17class BlockPos;
18class BlockSource;
19class BoundingBox;
20class IRandom;
21class JigsawBlockInfo;
24class Random;
31namespace SharedTypes::v1_21_80 { struct JigsawStructureMetadata; }
32namespace br::worldgen { struct StructureProcessor; }
33// clang-format on
34
36public:
37 // StructurePoolElement inner types declare
38 // clang-format off
39 class ITemplate;
40 class LazyTemplate;
41 // clang-format on
42
43 // StructurePoolElement inner types define
44 using StructureProcessorPtr = ::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>;
45
46 using StructureProcessorList =
47 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>>;
48
49 class ITemplate {
50 public:
51 // virtual functions
52 // NOLINTBEGIN
53 // vIndex: 0
54 virtual ~ITemplate();
55
56 // vIndex: 1
57 virtual ::std::vector<::JigsawBlockInfo> const& getJigsawMarkers() const = 0;
58
59 // vIndex: 2
60 virtual ::BlockPos getSize(::Rotation) const = 0;
61
62 // vIndex: 3
63 virtual bool isLegacyStructure() const = 0;
64 // NOLINTEND
65
66 public:
67 // destructor thunk
68 // NOLINTBEGIN
69 MCNAPI void $dtor();
70 // NOLINTEND
71
72 public:
73 // virtual function thunks
74 // NOLINTBEGIN
75
76 // NOLINTEND
77
78 public:
79 // vftables
80 // NOLINTBEGIN
81 MCNAPI static void** $vftable();
82 // NOLINTEND
83 };
84
86 public:
87 // member variables
88 // NOLINTBEGIN
91 // NOLINTEND
92
93 public:
94 // prevent constructor by default
95 LazyTemplate& operator=(LazyTemplate const&);
98
99 public:
100 // virtual functions
101 // NOLINTBEGIN
102 // vIndex: 1
103 virtual ::std::vector<::JigsawBlockInfo> const& getJigsawMarkers() const /*override*/;
104
105 // vIndex: 2
106 virtual ::BlockPos getSize(::Rotation rotation) const /*override*/;
107
108 // vIndex: 3
109 virtual bool isLegacyStructure() const /*override*/;
110
111 // vIndex: 0
112 virtual ~LazyTemplate() /*override*/ = default;
113 // NOLINTEND
114
115 public:
116 // member functions
117 // NOLINTBEGIN
119 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
120 ::std::string const& location,
121 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules
122 );
123 // NOLINTEND
124
125 public:
126 // static functions
127 // NOLINTBEGIN
128 MCNAPI static ::std::vector<::JigsawBlockInfo> _findJigsawBlocks(
129 ::std::vector<::JigsawStructureBlockInfo>& jigsawMarkers,
130 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules
131 );
132 // NOLINTEND
133
134 public:
135 // constructor thunks
136 // NOLINTBEGIN
137 MCNAPI void* $ctor(
138 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
139 ::std::string const& location,
140 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules
141 );
142 // NOLINTEND
143
144 public:
145 // virtual function thunks
146 // NOLINTBEGIN
147 MCNAPI ::std::vector<::JigsawBlockInfo> const& $getJigsawMarkers() const;
148
149 MCNAPI ::BlockPos $getSize(::Rotation rotation) const;
150
151 MCNAPI bool $isLegacyStructure() const;
152 // NOLINTEND
153
154 public:
155 // vftables
156 // NOLINTBEGIN
157 MCNAPI static void** $vftable();
158 // NOLINTEND
159 };
160
161public:
162 // member variables
163 // NOLINTBEGIN
164 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadata>> mMetadata;
165 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMetadataMutex;
166 ::ll::TypedStorage<8, 8, ::std::once_flag> mTemplateOnceFlag;
167 ::ll::TypedStorage<8, 56, ::std::optional<::StructurePoolElement::LazyTemplate>> mTemplate;
168 ::ll::TypedStorage<8, 8, uint64> mMetadataKey;
169 ::ll::TypedStorage<8, 32, ::std::string> mLocation;
170 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mManager;
171 ::ll::TypedStorage<8, 32, ::StructurePoolElementSettings> mSettings;
172 ::ll::TypedStorage<
173 8,
174 16,
175 ::gsl::not_null<::std::shared_ptr<
176 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>>
177 mProcessors;
178 ::ll::TypedStorage<1, 1, bool> mValid;
179 // NOLINTEND
180
181public:
182 // prevent constructor by default
184
185public:
186 // virtual functions
187 // NOLINTBEGIN
188 // vIndex: 0
189 virtual ::BlockPos getSize(::Rotation rotation) const;
190
191 // vIndex: 2
192 virtual ::std::vector<::JigsawBlockInfo> getJigsawMarkers(::BlockPos position, ::Rotation rotation) const;
193
194 // vIndex: 1
195 virtual ::std::vector<::JigsawBlockInfo>
196 getJigsawMarkers(::BlockPos position, ::LegacyStructureSettings& settings, ::BlockSource* region) const;
197
198 // vIndex: 3
199 virtual ::BoundingBox getBoundingBox(::BlockPos position, ::Rotation rotation) const;
200
201 // vIndex: 4
202 virtual void setProjection(::Projection projection);
203
204 // vIndex: 5
205 virtual ::Projection getProjection() const;
206
207 // vIndex: 6
208 virtual ::PostProcessSettings getPostProcessSettings() const;
209
210 // vIndex: 8
211 virtual bool place(
212 ::BlockSource& region,
213 ::BlockPos position,
214 ::Rotation rotation,
215 ::BoundingBox chunkBB,
216 ::Random& random,
217 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace,
218 ::BlockPos refPos
219 ) const;
220
221 // vIndex: 7
222 virtual bool place(
223 ::BlockSource& region,
224 ::BlockPos position,
225 ::BlockPos sectionOrigin,
226 ::BoundingBox chunkBB,
227 ::Rotation rotation,
228 ::IRandom& random,
229 ::br::worldgen::JigsawReplacement jigsaw
230 ) const;
231
232 // vIndex: 9
233 virtual void placeActors(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::Random& random) const;
234
235 // vIndex: 10
236 virtual void
237 placeEntities(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::BoundingBox overlapBB) const;
238
239 // vIndex: 11
240 virtual void
241 handleJigsawBlock(::BlockSource& region, ::JigsawBlockInfo& jigsawBlock, ::LegacyStructureSettings& settings) const;
242
243 // vIndex: 12
244 virtual void handleDataMarker(
245 ::BlockSource& region,
246 ::BlockPos markerPos,
247 ::std::string markerData,
248 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace
249 ) const;
250
251 // vIndex: 13
252 virtual bool isValid() const;
253
254 // vIndex: 14
255 virtual ~StructurePoolElement();
256
257 // vIndex: 15
258 virtual ::StructurePoolElementType type() const;
259 // NOLINTEND
260
261public:
262 // member functions
263 // NOLINTBEGIN
265 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
266 ::std::string const& location,
268 );
269
271 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
272 ::std::string const& location,
273 ::gsl::not_null<::std::shared_ptr<
274 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
275 processors,
276 ::Projection projection
277 );
278
280 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
281 ::std::string const& location,
282 ::Projection projection,
283 ::PostProcessSettings postProcessSettings
284 );
285
287 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
288 ::std::string const& location,
289 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
290 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
291 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules,
292 ::Projection projection,
293 ::PostProcessSettings postProcessSettings
294 );
295
296 MCAPI ::std::unique_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadata> _createMetadata() const;
297
298 MCAPI ::SharedTypes::v1_21_80::JigsawStructureMetadata const& _getMetadata() const;
299
300 MCAPI uint64 _getMetadataKey() const;
301
302 MCAPI ::StructurePoolElement::LazyTemplate const& _getTemplate() const;
303 // NOLINTEND
304
305public:
306 // static functions
307 // NOLINTBEGIN
308 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
309 single(::std::string_view location);
310
311 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
312 single(
313 ::std::string_view location,
314 ::gsl::not_null<::std::shared_ptr<
315 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
316 processors
317 );
318
319 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
320 single(
321 ::std::string_view location,
322 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
323 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
324 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules
325 );
326 // NOLINTEND
327
328public:
329 // constructor thunks
330 // NOLINTBEGIN
331 MCAPI void* $ctor(
332 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
333 ::std::string const& location,
335 );
336
337 MCAPI void* $ctor(
338 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
339 ::std::string const& location,
340 ::gsl::not_null<::std::shared_ptr<
341 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
342 processors,
343 ::Projection projection
344 );
345
346 MCAPI void* $ctor(
347 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
348 ::std::string const& location,
349 ::Projection projection,
350 ::PostProcessSettings postProcessSettings
351 );
352
353 MCAPI void* $ctor(
354 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
355 ::std::string const& location,
356 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
357 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
358 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules,
359 ::Projection projection,
360 ::PostProcessSettings postProcessSettings
361 );
362 // NOLINTEND
363
364public:
365 // destructor thunk
366 // NOLINTBEGIN
367 MCAPI void $dtor();
368 // NOLINTEND
369
370public:
371 // virtual function thunks
372 // NOLINTBEGIN
373 MCAPI ::BlockPos $getSize(::Rotation rotation) const;
374
375 MCAPI ::std::vector<::JigsawBlockInfo> $getJigsawMarkers(::BlockPos position, ::Rotation rotation) const;
376
377 MCAPI ::std::vector<::JigsawBlockInfo>
378 $getJigsawMarkers(::BlockPos position, ::LegacyStructureSettings& settings, ::BlockSource* region) const;
379
380 MCAPI ::BoundingBox $getBoundingBox(::BlockPos position, ::Rotation rotation) const;
381
382 MCFOLD void $setProjection(::Projection projection);
383
384 MCAPI ::Projection $getProjection() const;
385
386 MCAPI ::PostProcessSettings $getPostProcessSettings() const;
387
388 MCAPI bool $place(
389 ::BlockSource& region,
390 ::BlockPos position,
391 ::Rotation rotation,
392 ::BoundingBox chunkBB,
393 ::Random& random,
394 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace,
395 ::BlockPos refPos
396 ) const;
397
398 MCAPI bool $place(
399 ::BlockSource& region,
400 ::BlockPos position,
401 ::BlockPos sectionOrigin,
402 ::BoundingBox chunkBB,
403 ::Rotation rotation,
404 ::IRandom& random,
405 ::br::worldgen::JigsawReplacement jigsaw
406 ) const;
407
408 MCAPI void $placeActors(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::Random& random) const;
409
410 MCAPI void
411 $placeEntities(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::BoundingBox overlapBB) const;
412
413 MCAPI void $handleJigsawBlock(
414 ::BlockSource& region,
415 ::JigsawBlockInfo& jigsawBlock,
417 ) const;
418
419 MCAPI void $handleDataMarker(
420 ::BlockSource& region,
421 ::BlockPos markerPos,
422 ::std::string markerData,
423 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace
424 ) const;
425
426 MCAPI bool $isValid() const;
427
428 MCFOLD ::StructurePoolElementType $type() const;
429 // NOLINTEND
430
431public:
432 // vftables
433 // NOLINTBEGIN
434 MCNAPI static void** $vftable();
435 // NOLINTEND
436};
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BoundingBox.h:13
Definition IRandom.h:10
Definition JigsawBlockInfo.h:12
Definition JigsawStructureBlockInfo.h:14
Definition LegacyStructureSettings.h:22
Definition Random.h:11
Definition StructureManager.h:40
Definition StructurePoolActorRule.h:10
Definition StructurePoolBlockRule.h:13
Definition StructurePoolBlockTagRule.h:12
Definition StructurePoolElement.h:49
static MCAPI void ** $vftable()
Definition StructurePoolElement.h:85
MCAPI ::std::vector<::JigsawBlockInfo > const & $getJigsawMarkers() const
MCAPI bool $isLegacyStructure() const
static MCAPI ::std::vector<::JigsawBlockInfo > _findJigsawBlocks(::std::vector<::JigsawStructureBlockInfo > &jigsawMarkers, ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule > > const *blockTagRules)
MCAPI void * $ctor(::Bedrock::NotNullNonOwnerPtr<::StructureManager > manager, ::std::string const &location, ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule > > const *blockTagRules)
static MCAPI void ** $vftable()
MCAPI::BlockPos $getSize(::Rotation rotation) const
MCAPI LazyTemplate(::Bedrock::NotNullNonOwnerPtr<::StructureManager > manager, ::std::string const &location, ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule > > const *blockTagRules)
Definition StructurePoolElement.h:35
static MCAPI void ** $vftable()
Definition ActorDefinitionIdentifier.h:15
Definition StructurePoolElementSettings.h:16
Definition StructureTemplateRegistrationContext.h:17
Definition Alias.h:14