LeviLamina
Loading...
Searching...
No Matches
BiomeRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/level/biome/components/vanilla/VanillaBiomeTypes.h"
5
6// auto generated inclusion list
7#include "mc/deps/core/utility/AutomaticID.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/core/utility/pub_sub/Subscription.h"
11#include "mc/platform/brstd/flat_set.h"
12#include "mc/util/IDType.h"
13#include "mc/util/TagRegistry.h"
14#include "mc/world/level/biome/registry/WellKnownBiomeTags.h"
15
16// auto generated forward declare list
17// clang-format off
18class BaseGameVersion;
20class Biome;
21class Dimension;
22class HashedString;
25class LevelStorage;
28struct BiomeTagIDType;
30namespace Core { class Path; }
31namespace cereal { struct ReflectionCtx; }
32// clang-format on
33
35public:
36 // BiomeRegistry inner types declare
37 // clang-format off
38 struct BiomeComparator;
40 // clang-format on
41
42 // BiomeRegistry inner types define
44 public:
45 // member variables
46 // NOLINTBEGIN
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
55
56 public:
57 // member functions
58 // NOLINTBEGIN
60 // NOLINTEND
61
62 public:
63 // destructor thunk
64 // NOLINTBEGIN
65 MCNAPI void $dtor();
66 // NOLINTEND
67 };
68
69 using BiomeNameLookupMap = ::std::unordered_map<uint64, ::std::unique_ptr<::Biome>>;
70
71 struct BiomeComparator {};
72
73public:
74 // member variables
75 // NOLINTBEGIN
76 ::ll::TypedStorage<8, 552, ::WellKnownBiomeTags> mWellKnownBiomeTags;
77 ::ll::TypedStorage<1, 1, bool> mSurfaceBuildersResolved;
78 ::ll::TypedStorage<1, 1, bool> mClientInitialized;
79 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::unique_ptr<::Biome>>> mBiomesByName;
80 ::ll::TypedStorage<
81 8,
82 40,
84 ::gsl::not_null<::Biome*>,
86 ::std::vector<::gsl::not_null<::Biome*>>>>
87 mBiomesById;
88 ::ll::TypedStorage<4, 4, uint> mNextCustomBiomeId;
89 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mClosedForRegistration;
90 ::ll::TypedStorage<1, 1, bool> mLoadFromAllPacks;
91 ::ll::TypedStorage<8, 128, ::TagRegistry<::IDType<::BiomeTagIDType>, ::IDType<::BiomeTagSetIDType>>> mTagRegistry;
92 ::ll::TypedStorage<8, 8, ::Biome*> mEmptyBiome;
93 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveSubscription;
94 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelStorageManagerStartLeaveGameSubscription;
95 // NOLINTEND
96
97public:
98 // prevent constructor by default
100
101public:
102 // virtual functions
103 // NOLINTBEGIN
104 // vIndex: 0
105 virtual ~BiomeRegistry() /*override*/;
106 // NOLINTEND
107
108public:
109 // member functions
110 // NOLINTBEGIN
111 MCAPI explicit BiomeRegistry(::BaseGameVersion const& baseGameVersion);
112
113 MCAPI void _initEngineBiome(::BaseGameVersion const& baseGameVersion);
114
115 MCAPI void _initTagRegistry();
116
117 MCAPI ::Biome& _register(::std::string const& name, ushort id);
118
119 MCAPI void _save(::LevelStorage& levelStorage) const;
120
121 MCFOLD void forEachBiome(::std::function<void(::Biome const&)> callback) const;
122
123 MCFOLD void forEachNonConstBiome(::std::function<void(::Biome&)> callback);
124
125 MCAPI ::std::vector<::Biome const*> getBiomesInDimension(::DimensionType type) const;
126
127 MCAPI void initServerFromPacks(
128 ::ResourcePackManager const& loader,
129 ::IWorldRegistriesProvider& worldRegistries,
131 );
132
133 MCAPI void
134 initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
135
136 MCAPI void loadBiomeData(::LevelStorage const& levelStorage);
137
138 MCAPI void loadBiomeTable(::LevelStorage const& levelStorage, ::BaseGameVersion const& baseGameVersion);
139
140 MCAPI ::Biome const* lookupByHash(::HashedString const&) const;
141
142 MCFOLD ::Biome* lookupByHash(::HashedString const& hash);
143
144 MCAPI ::Biome const* lookupByName(::std::string const&) const;
145
146 MCFOLD ::Biome* lookupByName(::std::string const& name);
147
148 MCAPI void saveBiomeTable(::LevelStorage& levelStorage, ::BaseGameVersion const& baseGameVersion) const;
149 // NOLINTEND
150
151public:
152 // static functions
153 // NOLINTBEGIN
154 MCAPI static ::BiomeRegistry::LoadedBiomeDocument _loadBiomeDocument(
155 ::ResourcePackManager const& loader,
156 ::std::string const& biomeName,
157 bool loadFromAllPacks,
159 ::BedrockLoadContext& loadContext
160 );
161
162 MCAPI static ::std::string
163 getBiomeResourceText(::ResourcePackManager const& loader, ::Core::Path const& biomePath, bool loadFromAllPacks);
164 // NOLINTEND
165
166public:
167 // constructor thunks
168 // NOLINTBEGIN
169 MCAPI void* $ctor(::BaseGameVersion const& baseGameVersion);
170 // NOLINTEND
171
172public:
173 // destructor thunk
174 // NOLINTBEGIN
175 MCAPI void $dtor();
176 // NOLINTEND
177
178public:
179 // vftables
180 // NOLINTBEGIN
181 MCNAPI static void** $vftable();
182 // NOLINTEND
183};
Definition AutomaticID.h:6
Definition BaseGameVersion.h:8
Definition BedrockLoadContext.h:14
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition BiomeRegistry.h:34
static MCAPI void ** $vftable()
Definition Biome.h:26
Definition Path.h:17
Definition Dimension.h:83
Definition HashedString.h:5
Definition ILevelStorageManagerConnector.h:13
Definition IWorldRegistriesProvider.h:26
Definition LevelStorage.h:25
Definition LinkedAssetValidator.h:8
Definition Path.h:16
Definition ResourcePackManager.h:24
Definition flat_set.h:8
Definition BiomeRegistry.h:71
Definition BiomeRegistry.h:43
Definition BiomeTagIDType.h:5
Definition BiomeTagSetIDType.h:5
Definition IDType.h:6
Definition ReflectionCtx.h:11
Definition ctx.h:5
Definition Alias.h:14