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/EnableNonOwnerReferences.h"
8#include "mc/deps/core/utility/NonOwnerPointer.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 Experiments;
20class HashedString;
23class LevelStorage;
26class WellKnownTagID;
27struct BiomeHashType;
28struct BiomeIdType;
31struct BiomeTagIDType;
33struct DimensionType;
34namespace cereal { struct ReflectionCtx; }
35// clang-format on
36
37class BiomeRegistry : public ::Bedrock::EnableNonOwnerReferences {
38public:
39 // BiomeRegistry inner types declare
40 // clang-format off
41 struct BiomeComparator;
44 // clang-format on
45
46 // BiomeRegistry inner types define
48 public:
49 // BiomeComparator inner types define
50 using is_transparent = void;
51 };
52
54
56 public:
57 // member variables
58 // NOLINTBEGIN
59 ::ll::TypedStorage<4, 4, float> mTemperature;
60 ::ll::TypedStorage<4, 4, float> mDownfall;
61 ::ll::TypedStorage<4, 4, float> mFoliageSnow;
62 // NOLINTEND
63 };
64
65 using BiomeNameLookupMap = ::std::unordered_map<uint64, ::std::unique_ptr<::Biome>>;
66
67public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<8, 128, ::TagRegistry<::IDType<::BiomeTagIDType>, ::IDType<::BiomeTagSetIDType>>> mTagRegistry;
71 ::ll::TypedStorage<8, 720, ::WellKnownBiomeTags const> mWellKnownBiomeTags;
72 ::ll::TypedStorage<1, 1, bool> mSurfaceBuildersResolved;
73 ::ll::TypedStorage<1, 1, bool> mClientInitialized;
74 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::std::unique_ptr<::Biome>>> mBiomesByName;
75 ::ll::TypedStorage<
76 8,
77 24,
79 ::gsl::not_null<::Biome*>,
81 ::std::vector<::gsl::not_null<::Biome*>>>>
82 mBiomesById;
83 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::BiomeIdType const, ::std::string const&>>>
84 mRemovedBiomesIdAndFullName;
85 ::ll::TypedStorage<4, 4, uint> mNextCustomBiomeId;
86 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mClosedForRegistration;
87 ::ll::TypedStorage<8, 8, ::Biome*> mEmptyBiome;
88 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveSubscription;
89 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelStorageManagerStartLeaveGameSubscription;
90 ::ll::TypedStorage<8, 24, ::std::vector<::BiomeRegistry::SeasonTextureRowSettings>> mSeasonTextureRowSettings;
91 // NOLINTEND
92
93public:
94 // virtual functions
95 // NOLINTBEGIN
96 virtual ~BiomeRegistry() /*override*/ = default;
97 // NOLINTEND
98
99public:
100 // member functions
101 // NOLINTBEGIN
102 MCAPI BiomeRegistry();
103
104 MCAPI ::Biome& _register(::std::string_view name, ::BiomeIdType id);
105
106 MCAPI void _save(::LevelStorage& levelStorage) const;
107
108#ifdef LL_PLAT_C
109 MCAPI
110 uint64 assignSeasonTextureRow(::BiomeRegistry::SeasonTextureRowSettings const& desiredSettings, uint64 maxSize);
111#endif
112
113 MCAPI ::std::vector<::std::string> const biomeGetTags(::Biome const& biome) const;
114
115 MCAPI bool biomeHasTag(::Biome const& biome, ::HashedString const& id) const;
116
117 MCAPI bool biomeHasTag(::Biome const& biome, uint64 tagHash) const;
118
119 MCFOLD bool biomeHasTag(::Biome const& biome, ::IDType<::BiomeTagIDType> const& tagID) const;
120
121 MCFOLD bool biomeHasTag(::Biome const& biome, ::WellKnownTagID const& tagID) const;
122
123 MCAPI ::std::vector<::Biome const*> getBiomesInDimension(::DimensionType type) const;
124
125 MCAPI void
126 initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
127
128 MCAPI void loadAllBiomeDocuments(
129 ::ResourcePackManager const& loader,
132 ::BaseGameVersion const& baseGameVersion,
133 ::BiomeJsonDocumentGlue& biomeJsonDocumentGlue,
134 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlueResolvedBiomeData>>&
135 biomeIdToResolvedData,
136 ::Experiments const& activeExperiments,
137 ::IMinecraftEventing& eventing
138 );
139
140 MCAPI void loadBiomeData(::LevelStorage const& levelStorage);
141
142 MCAPI void loadBiomeTable(::LevelStorage const& levelStorage);
143
144 MCFOLD ::Biome const* lookupByHashId(::BiomeHashType id) const;
145
146 MCFOLD ::Biome* lookupByHashId(::BiomeHashType id);
147
148 MCAPI ::Biome* lookupById(::BiomeIdType id);
149
150 MCFOLD ::Biome const* lookupByName(::std::string const& name) const;
151
152 MCFOLD ::Biome* lookupByName(::std::string const& name);
153 // NOLINTEND
154
155public:
156 // constructor thunks
157 // NOLINTBEGIN
158 MCAPI void* $ctor();
159 // NOLINTEND
160
161public:
162 // vftables
163 // NOLINTBEGIN
164 MCNAPI static void** $vftable();
165 // NOLINTEND
166};
Definition BaseGameVersion.h:8
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
static MCAPI void ** $vftable()
Definition Biome.h:23
Definition Experiments.h:14
Definition HashedString.h:5
Definition ILevelStorageManagerConnector.h:13
Definition IMinecraftEventing.h:147
Definition LevelStorage.h:25
Definition LinkedAssetValidator.h:8
Definition ResourcePackManager.h:36
Definition WellKnownTagID.h:15
Definition flat_set.h:10
Definition BiomeHashType.h:8
Definition BiomeIdType.h:8
Definition BiomeJsonDocumentGlueResolvedBiomeData.h:11
Definition BiomeJsonDocumentGlue.h:11
Definition BiomeRegistry.h:47
Definition BiomeRegistry.h:53
Definition BiomeRegistry.h:55
Definition BiomeTagIDType.h:5
Definition BiomeTagSetIDType.h:5
Definition DimensionType.h:5
Definition IDType.h:6
Definition ReflectionCtx.h:11
Definition ctx.h:5