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