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