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/util/Rotation.h"
8#include "mc/world/level/levelgen/structure/PostProcessSettings.h"
9#include "mc/world/level/levelgen/structure/Projection.h"
10#include "mc/world/level/levelgen/structure/structurepools/JigsawReplacement.h"
11#include "mc/world/level/levelgen/structure/structurepools/StructurePoolElementType.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockPos;
16class BlockSource;
17class BoundingBox;
18class IRandom;
19class JigsawBlockInfo;
22class Random;
30namespace Bedrock::Threading { class Mutex; }
31namespace SharedTypes::v1_21_50 { 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 MCFOLD void $dtor();
70 // NOLINTEND
71
72 public:
73 // virtual function thunks
74 // NOLINTBEGIN
75
76 // NOLINTEND
77
78 public:
79 // vftables
80 // NOLINTBEGIN
81 MCAPI 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
118 MCAPI LazyTemplate(
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 MCAPI 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 MCAPI 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 // destructor thunk
146 // NOLINTBEGIN
147
148 // NOLINTEND
149
150 public:
151 // virtual function thunks
152 // NOLINTBEGIN
153 MCFOLD ::std::vector<::JigsawBlockInfo> const& $getJigsawMarkers() const;
154
155 MCAPI ::BlockPos $getSize(::Rotation rotation) const;
156
157 MCAPI bool $isLegacyStructure() const;
158 // NOLINTEND
159
160 public:
161 // vftables
162 // NOLINTBEGIN
163 MCAPI static void** $vftable();
164 // NOLINTEND
165 };
166
167public:
168 // member variables
169 // NOLINTBEGIN
170 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SharedTypes::v1_21_50::JigsawStructureMetadata>> mMetadata;
171 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMetadataMutex;
172 ::ll::TypedStorage<8, 8, ::std::once_flag> mTemplateOnceFlag;
173 ::ll::TypedStorage<8, 56, ::std::optional<::StructurePoolElement::LazyTemplate>> mTemplate;
174 ::ll::TypedStorage<8, 8, uint64> mMetadataKey;
175 ::ll::TypedStorage<8, 32, ::std::string> mLocation;
176 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mManager;
177 ::ll::TypedStorage<8, 32, ::StructurePoolElementSettings> mSettings;
178 ::ll::TypedStorage<
179 8,
180 16,
181 ::gsl::not_null<::std::shared_ptr<
182 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>>
183 mProcessors;
184 ::ll::TypedStorage<1, 1, bool> mValid;
185 // NOLINTEND
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 ) const;
233
234 // vIndex: 9
235 virtual void placeActors(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::Random& random) const;
236
237 // vIndex: 10
238 virtual void
239 placeEntities(::BlockSource& region, ::BlockPos position, ::Rotation rotation, ::BoundingBox overlapBB) const;
240
241 // vIndex: 11
242 virtual void
243 handleJigsawBlock(::BlockSource& region, ::JigsawBlockInfo& jigsawBlock, ::LegacyStructureSettings& settings) const;
244
245 // vIndex: 12
246 virtual void handleDataMarker(
247 ::BlockSource& region,
248 ::BlockPos markerPos,
249 ::std::string markerData,
250 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace
251 ) const;
252
253 // vIndex: 13
254 virtual bool isValid() const;
255
256 // vIndex: 14
257 virtual ~StructurePoolElement();
258
259 // vIndex: 15
260 virtual ::StructurePoolElementType type() const;
261 // NOLINTEND
262
263public:
264 // member functions
265 // NOLINTBEGIN
267 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
268 ::std::string const& location,
270 );
271
273 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
274 ::std::string const& location,
275 ::gsl::not_null<::std::shared_ptr<
276 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
277 processors,
278 ::Projection projection
279 );
280
282 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
283 ::std::string const& location,
284 ::Projection projection,
285 ::PostProcessSettings postProcessSettings
286 );
287
289 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
290 ::std::string const& location,
291 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
292 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
293 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules,
294 ::Projection projection,
295 ::PostProcessSettings postProcessSettings
296 );
297
298 MCAPI ::std::unique_ptr<::SharedTypes::v1_21_50::JigsawStructureMetadata> _createMetadata() const;
299
300 MCAPI ::SharedTypes::v1_21_50::JigsawStructureMetadata const& _getMetadata() const;
301
302 MCAPI uint64 _getMetadataKey() const;
303
304 MCAPI ::StructurePoolElement::LazyTemplate const& _getTemplate() const;
305 // NOLINTEND
306
307public:
308 // static functions
309 // NOLINTBEGIN
310 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
311 single(::std::string_view location);
312
313 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
314 single(
315 ::std::string_view location,
316 ::gsl::not_null<::std::shared_ptr<
317 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
318 processors
319 );
320
321 MCAPI static ::std::function<::StructurePoolElement const&(::StructureTemplateRegistrationContext, ::Projection)>
322 single(
323 ::std::string_view location,
324 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
325 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
326 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules
327 );
328 // NOLINTEND
329
330public:
331 // constructor thunks
332 // NOLINTBEGIN
333 MCAPI void* $ctor(
334 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
335 ::std::string const& location,
337 );
338
339 MCAPI void* $ctor(
340 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
341 ::std::string const& location,
342 ::gsl::not_null<::std::shared_ptr<
343 ::std::vector<::gsl::not_null<::std::shared_ptr<::br::worldgen::StructureProcessor const>>> const>>
344 processors,
345 ::Projection projection
346 );
347
348 MCAPI void* $ctor(
349 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
350 ::std::string const& location,
351 ::Projection projection,
352 ::PostProcessSettings postProcessSettings
353 );
354
355 MCAPI void* $ctor(
356 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> manager,
357 ::std::string const& location,
358 ::std::vector<::std::unique_ptr<::StructurePoolBlockRule>> const* blockRules,
359 ::std::vector<::std::unique_ptr<::StructurePoolBlockTagRule>> const* blockTagRules,
360 ::std::vector<::std::unique_ptr<::StructurePoolActorRule>> const* actorRules,
361 ::Projection projection,
362 ::PostProcessSettings postProcessSettings
363 );
364 // NOLINTEND
365
366public:
367 // destructor thunk
368 // NOLINTBEGIN
369 MCAPI void $dtor();
370 // NOLINTEND
371
372public:
373 // virtual function thunks
374 // NOLINTBEGIN
375 MCAPI ::BlockPos $getSize(::Rotation rotation) const;
376
377 MCAPI ::std::vector<::JigsawBlockInfo> $getJigsawMarkers(::BlockPos position, ::Rotation rotation) const;
378
379 MCAPI ::std::vector<::JigsawBlockInfo>
380 $getJigsawMarkers(::BlockPos position, ::LegacyStructureSettings& settings, ::BlockSource* region) const;
381
382 MCAPI ::BoundingBox $getBoundingBox(::BlockPos position, ::Rotation rotation) const;
383
384 MCFOLD void $setProjection(::Projection projection);
385
386 MCAPI ::Projection $getProjection() const;
387
388 MCAPI ::PostProcessSettings $getPostProcessSettings() const;
389
390 MCAPI bool $place(
391 ::BlockSource& region,
392 ::BlockPos position,
393 ::Rotation rotation,
394 ::BoundingBox chunkBB,
395 ::Random& random,
396 ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>& entitiesToPlace,
397 ::BlockPos refPos
398 ) const;
399
400 MCAPI bool $place(
401 ::BlockSource& region,
402 ::BlockPos position,
403 ::BlockPos sectionOrigin,
404 ::BoundingBox chunkBB,
405 ::Rotation rotation,
406 ::IRandom& random,
407 ::br::worldgen::JigsawReplacement jigsaw
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
416 $handleJigsawBlock(::BlockSource& region, ::JigsawBlockInfo& jigsawBlock, ::LegacyStructureSettings& settings)
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 MCAPI static void** $vftable();
435 // NOLINTEND
436};
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BoundingBox.h:18
Definition IRandom.h:10
Definition JigsawBlockInfo.h:12
Definition JigsawStructureBlockInfo.h:12
Definition LegacyStructureSettings.h:22
Definition Random.h:16
Definition StructureManager.h:40
Definition StructurePoolActorRule.h:10
Definition StructurePoolBlockRule.h:13
Definition StructurePoolBlockTagRule.h:12
Definition StructurePoolElement.h:49
Definition StructurePoolElement.h:85
Definition StructurePoolElement.h:35
Definition ActorDefinitionIdentifier.h:13
Definition StructurePoolElementSettings.h:16
Definition StructureTemplateRegistrationContext.h:17
Definition Alias.h:14