3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/multiplayer/BeforeLevelForLevelHoldingOwnership.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/UniqueOwnerPointer.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/deps/game_refs/OwnerPtr.h"
11#include "mc/world/level/Level.h"
12#include "mc/world/level/PlayerSleepManager.h"
55 using ActorIdMap = ::std::map<int, ::Actor*>;
57 using ActorSet = ::std::set<::Actor*>;
62 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::TrustedSkinHelper>>> mTrustedSkinHelper;
63 ::ll::TypedStorage<8, 8, ::ResourcePackManager&> mClientResourcePackManager;
64 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::CameraRegistry>>> mCameraRegistry;
65 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::EntitySystems>>> mCameraSystems;
66 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::VolumeEntityManagerClient>> mVolumeEntityManager;
67 ::ll::TypedStorage<8, 16, ::gsl::not_null<::OwnerPtr<::TickTimeManagerClient>>> mTickTimeManager;
68 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::SubChunkManager>>> mSubChunkManager;
69 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSubChunkLoaded;
70 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::DisplayActorManager>>>
72 ::ll::TypedStorage<8, 40, ::PlayerSleepManager> mPlayerSleepManager;
73 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ArmorTrimIconGenerator>> mArmorTrimIconGenerator;
74 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ArmorTrimUnloader>> mArmorTrimUnloader;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::AtomicClientEntityManager>> mAtomicClientEntityManager;
76 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::MapDataManager>>> mMapDataManager;
77 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ClientSubChunkLighter>> mClientSubChunkLighter;
82 ClientLevel& operator=(ClientLevel
const&);
83 ClientLevel(ClientLevel
const&);
89 virtual ~ClientLevel() =
default;
91 virtual bool initialize(
92 ::std::string
const& levelName,
93 ::LevelSettings
const& levelSettings,
94 ::Experiments
const& experiments,
95 ::std::string
const* levelId,
96 ::std::optional<::std::reference_wrapper<
97 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlueResolvedBiomeData>>>>
101 virtual ::Tick
const getCurrentServerTick() const ;
103 virtual
void startLeaveGame() ;
105 virtual ::ResourcePackManager* getClientResourcePackManager() const ;
107 virtual ::Actor* addEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity) ;
109 virtual ::OwnerPtr<::EntityContext> removeActorFromWorldAndTakeEntity(::WeakEntityRef entityRef) ;
111 virtual ::OwnerPtr<::EntityContext> takeEntity(::WeakEntityRef entityRef, ::LevelChunk& lc) ;
113 virtual ::Actor* addDisplayEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity) ;
115 virtual
void removeDisplayEntity(::WeakEntityRef entity) ;
117 virtual ::Bedrock::NonOwnerPointer<::DisplayActorManager> getDisplayActorManager() ;
119 virtual ::PlayerSleepManager const& getPlayerSleepManager() const ;
121 virtual ::PlayerSleepManager& getPlayerSleepManager() ;
123 virtual
void notifySubChunkRequestManager(::SubChunkPacket const& packet) ;
125 virtual ::SubChunkRequestManager* getSubChunkRequestManager() ;
127 virtual
void onSubChunkLoaded(
128 ::ChunkSource& source,
130 short absoluteSubChunkIndex,
131 bool subChunkVisibilityChanged
134 virtual ::Bedrock::NonOwnerPointer<::SubChunkManager> getSubChunkManager() ;
136 virtual
bool canUseSkin(
137 ::SerializedSkinRef const& skin,
138 ::NetworkIdentifier const& networkIdentifier,
139 ::ActorUniqueID const& playerId
142 virtual ::Bedrock::NonOwnerPointer<::TrustedSkinHelper const> getTrustedSkinHelper() const ;
144 virtual ::ClientLevel* asClientLevel() ;
146 virtual ::Bedrock::NonOwnerPointer<::CameraRegistry const> getCameraRegistry() const ;
148 virtual ::Bedrock::NonOwnerPointer<::CameraRegistry> getCameraRegistry() ;
150 virtual ::Bedrock::NonOwnerPointer<::EntitySystems> getCameraSystems() ;
152 virtual ::ArmorTrimUnloader* getArmorTrimUnloader() ;
154 virtual ::Bedrock::NotNullNonOwnerPtr<::MapDataManager> getMapDataManager() ;
156 virtual ::GameModeExt::MessengerFactory createMessengerFactory() const ;
158 virtual
void subChunkTickAndSendRequests() ;
160 virtual ::std::weak_ptr<::ISubChunkLighter> getSubChunkLighter() const ;
162 virtual ::TickTimeManager const& _getTickTimeManager() const ;
164 virtual ::TickTimeManager& _getTickTimeManager() ;
166 virtual ::MapDataManager& _getMapDataManager() ;
168 virtual
void _subTick() ;
174 MCAPI explicit ClientLevel(::ClientLevelArguments&& args);
176 MCAPI
void _onSubChunkLoaded(
177 ::ChunkSource& source,
179 short absoluteSubChunkIndex,
180 bool subChunkVisibilityChanged
187 MCAPI
void cameraTick();
199 MCAPI
bool $initialize(
200 ::
std::
string const& levelName,
203 ::
std::
string const* levelId,
204 ::
std::optional<::
std::reference_wrapper<
206 biomeIdToResolvedData
209 MCAPI ::
Tick const $getCurrentServerTick() const;
211 MCAPI
void $startLeaveGame();
231 MCAPI
void $notifySubChunkRequestManager(::
SubChunkPacket const& packet);
235 MCAPI
void $onSubChunkLoaded(
238 short absoluteSubChunkIndex,
239 bool subChunkVisibilityChanged
242 MCAPI ::Bedrock::NonOwnerPointer<::
SubChunkManager> $getSubChunkManager();
244 MCAPI
bool $canUseSkin(
250 MCAPI ::Bedrock::NonOwnerPointer<::
TrustedSkinHelper const> $getTrustedSkinHelper() const;
252 MCFOLD ::ClientLevel* $asClientLevel();
254 MCAPI ::Bedrock::NonOwnerPointer<::
CameraRegistry const> $getCameraRegistry() const;
256 MCAPI ::Bedrock::NonOwnerPointer<::
CameraRegistry> $getCameraRegistry();
258 MCAPI ::Bedrock::NonOwnerPointer<::
EntitySystems> $getCameraSystems();
262 MCAPI ::Bedrock::NotNullNonOwnerPtr<::
MapDataManager> $getMapDataManager();
264 MCAPI ::GameModeExt::MessengerFactory $createMessengerFactory() const;
266 MCAPI
void $subChunkTickAndSendRequests();
276 MCAPI
void $_subTick();
Definition ArmorTrimIconGenerator.h:5
Definition ArmorTrimUnloader.h:5
Definition AtomicClientEntityManager.h:13
Definition BeforeLevelForLevelHoldingOwnership.h:5
Definition BlockSource.h:71
Definition CameraRegistry.h:5
Definition ChunkSource.h:36
Definition ClientLevel.h:5
LLAPI void addSubChunkPacketHandler(::std::shared_ptr<::SubChunkPacketHandler > handler)
Restored: inlined in the game, so it is reimplemented here. The insert manager is what actually owns ...
Definition ClientSubChunkLighter.h:5
Definition DisplayActorManager.h:21
Definition EntityContext.h:15
Definition EntitySystems.h:25
Definition Experiments.h:14
Definition ISubChunkLighter.h:16
Definition LevelChunk.h:77
Definition LevelSettings.h:38
Definition MapDataManager.h:24
Definition NetworkIdentifier.h:10
Definition PlayerSleepManager.h:9
Definition ResourcePackManager.h:36
Definition SerializedSkinRef.h:26
Definition SubChunkManager.h:5
Definition SubChunkPacketHandler.h:5
Definition SubChunkPacket.h:19
Definition SubChunkRequestManager.h:5
Definition TickTimeManagerClient.h:5
Definition TickTimeManager.h:16
Definition TrustedSkinHelper.h:5
Definition VolumeEntityManagerClient.h:5
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:5
Definition BiomeJsonDocumentGlueResolvedBiomeData.h:11
Definition ClientLevelArguments.h:5
Definition MessengerFactory.h:13