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