LeviLamina
Loading...
Searching...
No Matches
BiomeManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/game_refs/OwnerPtr.h"
10
11// auto generated forward declare list
12// clang-format off
14class BaseGameVersion;
16class BiomeRegistry;
19class LevelSeed64;
20class LevelStorage;
26namespace Bedrock::PubSub { class Subscription; }
27namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
28// clang-format on
29
30class BiomeManager {
31public:
32 // BiomeManager inner types define
33 using onLevelBiomesRegisteredSignature = void(::BiomeRegistry&);
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 16, ::gsl::not_null<::OwnerPtr<::BiomeRegistry>>> mBiomes;
39 ::ll::TypedStorage<8, 16, ::gsl::not_null<::OwnerPtr<::BiomeComponentFactory>>> mBiomeComponentFactory;
40 ::ll::TypedStorage<8, 16, ::gsl::not_null<::OwnerPtr<::SurfaceBuilderRegistry>>> mSurfaceBuilders;
41 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::AutomaticFeatureRules>>> mAutomaticFeatureRules;
42 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::BiomeDecorationFeature>>
43 mBiomeDecorationFeatureMap;
44 ::ll::TypedStorage<
45 8,
46 128,
48 mOnLevelBiomesRegisteredPublisher;
49 // NOLINTEND
50
51public:
52 // prevent constructor by default
53 BiomeManager();
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI
59 BiomeManager(::OwnerPtr<::BiomeRegistry> biomes, ::std::unique_ptr<::AutomaticFeatureRules> automaticFeatureRules);
60
61 MCAPI void _initializeServerBiomeRegistry(
62 ::IWorldRegistriesProvider& worldRegistries,
63 ::LevelSeed64 levelSeed,
64 ::LevelStorage& levelStorage,
66 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlueResolvedBiomeData>>&
67 biomeIdToResolvedData
68 );
69
70 MCFOLD ::BiomeComponentFactory& getBiomeComponentFactory();
71
72 MCFOLD ::std::unordered_map<::HashedString, ::BiomeDecorationFeature> const& getBiomeDecorationFeatures() const;
73
74 MCFOLD ::BiomeRegistry& getBiomeRegistry();
75
76 MCFOLD ::SurfaceBuilderRegistry& getSurfaceBuilderRegistry();
77
78 MCAPI void initializeBiomeRegistryAndAutomaticFeatureRulesOnServer(
79 ::IWorldRegistriesProvider& worldRegistries,
80 ::ResourcePackManager& resourcePackManager,
81 ::LevelSeed64 levelSeed,
82 ::LevelStorage& levelStorage,
84 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlueResolvedBiomeData>>&
85 biomeIdToResolvedData
86 );
87
88 MCAPI void
89 initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
90
91 MCAPI void loadBiomeData(::LevelStorage& levelStorage);
92
93#ifdef LL_PLAT_C
94 MCAPI void sendLevelBiomesRegistered();
95
96 MCAPI ::Bedrock::PubSub::Subscription
97 subscribeToLevelBiomesRegistered(::std::function<void(::BiomeRegistry&)> callback);
98#endif
99
100 MCAPI ~BiomeManager();
101 // NOLINTEND
102
103public:
104 // static functions
105 // NOLINTBEGIN
106 MCAPI static bool use3DBiomeMaps(::BaseGameVersion const& baseGameVersion);
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void*
113 $ctor(::OwnerPtr<::BiomeRegistry> biomes, ::std::unique_ptr<::AutomaticFeatureRules> automaticFeatureRules);
114 // NOLINTEND
115
116public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCAPI void $dtor();
120 // NOLINTEND
121};
Definition AutomaticFeatureRules.h:26
Definition BaseGameVersion.h:13
Definition NonOwnerPointer.h:9
Definition Publisher.h:8
Definition Subscription.h:10
Definition BiomeComponentFactory.h:22
Definition BiomeRegistry.h:37
Definition ILevelStorageManagerConnector.h:13
Definition IWorldRegistriesProvider.h:25
Definition LevelSeed64.h:5
Definition LevelStorage.h:26
Definition LinkedAssetValidator.h:8
Definition OwnerPtr.h:7
Definition ResourcePackManager.h:35
Definition SurfaceBuilderRegistry.h:13
Definition BiomeDecorationFeature.h:15
Definition BiomeJsonDocumentGlueResolvedBiomeData.h:10