LeviLamina
Loading...
Searching...
No Matches
StructureTemplatePool.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/levelgen/structure/Projection.h"
7
8// auto generated forward declare list
9// clang-format off
10class Random;
14// clang-format on
15
16class StructureTemplatePool {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<8, 32, ::std::string> mName;
21 ::ll::TypedStorage<8, 24, ::std::vector<::StructurePoolElement const*>> mTemplates;
22 ::ll::TypedStorage<8, 32, ::std::string> mFallback;
23 // NOLINTEND
24
25public:
26 // prevent constructor by default
27 StructureTemplatePool();
28
29public:
30 // member functions
31 // NOLINTBEGIN
32 MCAPI StructureTemplatePool(
33 ::std::string name,
34 ::std::string fallback,
35 ::std::vector<::std::pair<::StructurePoolElement const*, int>> const& templates
36 );
37
38 MCAPI StructureTemplatePool(
40 ::std::string_view name,
41 ::std::string_view fallback,
42 ::Projection projection,
43 ::std::initializer_list<::WeightedStructureTemplateRegistration> pieces
44 );
45
46 MCFOLD ::std::string const& getFallback() const;
47
48 MCAPI int getMaxHeight() const;
49
50 MCFOLD ::std::string const& getName() const;
51
52 MCAPI ::StructurePoolElement const* getRandomTemplate(::Random& random) const;
53
54 MCAPI ::std::vector<uint64> getShuffledTemplateIndexes(::Random& random) const;
55
56 MCAPI ::StructurePoolElement const* getTemplate(uint64 index) const;
57
58 MCFOLD ::std::vector<::StructurePoolElement const*> const& getTemplates() const;
59
60 MCAPI bool isValid() const;
61
62 MCFOLD uint64 size() const;
63
64 MCAPI ~StructureTemplatePool();
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCAPI static ::std::unique_ptr<::StructureTemplatePool> create(
72 ::std::string_view name,
73 ::std::string_view fallback,
74 ::std::initializer_list<::WeightedStructureTemplateRegistration> pieces,
75 ::Projection projection
76 );
77 // NOLINTEND
78
79public:
80 // constructor thunks
81 // NOLINTBEGIN
82 MCAPI void* $ctor(
83 ::std::string name,
84 ::std::string fallback,
85 ::std::vector<::std::pair<::StructurePoolElement const*, int>> const& templates
86 );
87
88 MCAPI void* $ctor(
90 ::std::string_view name,
91 ::std::string_view fallback,
92 ::Projection projection,
93 ::std::initializer_list<::WeightedStructureTemplateRegistration> pieces
94 );
95 // NOLINTEND
96
97public:
98 // destructor thunk
99 // NOLINTBEGIN
100 MCFOLD void $dtor();
101 // NOLINTEND
102};
Definition Random.h:10
Definition StructurePoolElement.h:40
Definition StructureTemplateRegistrationContext.h:17
Definition WeightedStructureTemplateRegistration.h:14
Definition context.h:5