3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/screens/models/LegacyWorldConversionManager.h"
7#include "mc/client/gui/screens/models/MainMenuScreenModel.h"
8#include "mc/client/gui/screens/models/interface/IWorldsProvider.h"
9#include "mc/client/gui/screens/models/interface/WorldType.h"
10#include "mc/client/legacy/ImportStatus.h"
11#include "mc/client/network/realms/GenericStatus.h"
12#include "mc/client/network/realms/RealmId.h"
13#include "mc/client/world/NetworkWorldType.h"
14#include "mc/deps/core/file/PathBuffer.h"
15#include "mc/deps/core/resource/PackType.h"
16#include "mc/deps/core/threading/Async.h"
17#include "mc/deps/core/utility/pub_sub/Subscription.h"
18#include "mc/events/IMinecraftEventing.h"
19#include "mc/platform/ErrorInfo.h"
20#include "mc/platform/Result.h"
21#include "mc/util/CallbackToken.h"
22#include "mc/util/UploadState.h"
23#include "mc/world/level/LevelListCacheObserver.h"
41namespace Core {
class Path; }
44namespace MSGraph::Models {
struct GraphError; }
45namespace Realms {
struct World; }
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Social::MultiplayerGameInfo>> server;
63 ::ll::TypedStorage<1, 1, bool> found;
64 ::ll::TypedStorage<8, 8, double> lastFoundTime;
65 ::ll::TypedStorage<1, 1, bool> dead;
73 ::ll::TypedStorage<8, 8, ::PlayScreenModel&> mModel;
78 PlayScreenLevelListCacheObserver& operator=(PlayScreenLevelListCacheObserver
const&);
79 PlayScreenLevelListCacheObserver(PlayScreenLevelListCacheObserver
const&);
80 PlayScreenLevelListCacheObserver();
86 onLevelAdded(::std::string
const& levelId, ::LevelListCacheObserver::LevelAddedType type) ;
88 virtual void onLevelUpdated(::std::string
const& levelId) ;
90 virtual void onLevelDeleted(::std::string
const& levelId) ;
92 virtual void onStorageChanged() ;
98 MCNAPI
void $onLevelAdded(::std::string
const& levelId, ::LevelListCacheObserver::LevelAddedType type);
108 using PlayerCountMap = ::std::map<::Realms::RealmId, int>;
110 using RealmFullMap = ::std::map<::Realms::RealmId, bool>;
112 using RealmsWorldList = ::std::vector<::Realms::World>;
114 using StashedNetworkSelection = ::std::pair<::NetworkWorldInfo const, ::NetworkWorldType>;
119 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::std::pair<::NetworkWorldInfo const, ::NetworkWorldType>>>
120 mLastNetworkSelection;
121 ::ll::TypedStorage<1, 1, bool> mIsDirty;
122 ::ll::TypedStorage<1, 1, bool> mServerDetailsRequested;
123 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mHttpProbePermission;
124 ::ll::TypedStorage<8, 24, ::std::vector<::LocalWorldInfo>> mLocalWorldList;
125 ::ll::TypedStorage<8, 24, ::std::vector<::LocalWorldInfo>> mBetaRetailLocalWorldList;
126 ::ll::TypedStorage<8, 24, ::std::vector<::WorldTemplateInfo>> mWorldTemplates;
127 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkWorldInfo>> mFriendsNetworkWorldList;
128 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkWorldInfo>> mCrossPlatformFriendsNetworkWorldList;
129 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkWorldInfo>> mLANNetworkWorldList;
130 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkWorldInfo>> mServerNetworkWorldList;
131 ::ll::TypedStorage<8, 24, ::std::vector<::RealmsWorldInfo>> mRealmWorldList;
132 ::ll::TypedStorage<8, 24, ::std::vector<::RealmsWorldInfo>> mUnpairedParentRealmWorldList;
133 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::NetworkWorldInfo>>> mThirdPartyServerWorldList;
134 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mLegacyWorldList;
135 ::ll::TypedStorage<8, 24, ::std::vector<::LegacyWorldInfo>> mBetaRetailLegacyWorldList;
136 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::ResourceLocation>> mNetworkedFriendsGamerpicMap;
137 ::ll::TypedStorage<8, 72, ::std::chrono::steady_clock::time_point[9]> mUpdateTimes;
138 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::World>> mWorlds;
139 ::ll::TypedStorage<1, 1, bool> mWorldsFetched;
140 ::ll::TypedStorage<8, 24, ::std::vector<::Realms::World>> mUnpairedParentWorlds;
141 ::ll::TypedStorage<1, 1, bool> mUnpairedWorldsFetched;
142 ::ll::TypedStorage<8, 16, ::std::map<::Realms::RealmId, int>> mUnreadCounts;
143 ::ll::TypedStorage<4, 4, int> mRealmWorldPartitionIndex;
144 ::ll::TypedStorage<4, 24, ::std::array<int, 6>> mSeenUnreadPosts;
145 ::ll::TypedStorage<1, 1, bool> mLocalWorldsPopulated;
146 ::ll::TypedStorage<1, 1, bool> mHasPendingInvites;
147 ::ll::TypedStorage<4, 4, int> mPendingInviteCount;
148 ::ll::TypedStorage<1, 1, bool> mFetchingInvites;
149 ::ll::TypedStorage<1, 1, bool> mFetchingLegacyWorldsInProgress;
150 ::ll::TypedStorage<1, 1, bool> mLegacyWorldsFetched;
151 ::ll::TypedStorage<1, 1, bool> mFoundLegacyWorlds;
152 ::ll::TypedStorage<8, 128, ::LegacyWorldConversionManager> mLegacyWorldConversionManager;
153 ::ll::TypedStorage<8, 24, ::std::vector<::LocalWorldInfo>> mEduCloudWorlds;
154 ::ll::TypedStorage<1, 1, bool> mFetchingEduCloudWorldsInProgress;
155 ::ll::TypedStorage<1, 1, bool> mEduCloudWorldsFetched;
156 ::ll::TypedStorage<1, 1, bool> mEduCloudWorldsPopulated;
157 ::ll::TypedStorage<1, 1, bool> mEduCloudFetchFailed;
158 ::ll::TypedStorage<4, 4, int> mEduCloudWorldsFetchRetriesRemaining;
159 ::ll::TypedStorage<8, 32, ::std::string> mEduCloudWorldsFetchNextLinkUrl;
165 mEduCloudWorldsHandle;
166 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mFetchStartTimestamp;
167 ::ll::TypedStorage<8, 32, ::std::string> mFetchCorrelationId;
168 ::ll::TypedStorage<1, 1, bool> mFetchingPlayerCounts;
169 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastRealmsUpdate;
170 ::ll::TypedStorage<1, 1, bool> mJoiningRealm;
171 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastTryJoin;
172 ::ll::TypedStorage<8, 8, ::std::chrono::seconds> mRetryJoinInterval;
173 ::ll::TypedStorage<4, 4, int> mRetryTime;
174 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPendingInviteCountSubscriber;
175 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Legacy::WorldImporter>> mLegacyWorldImporter;
176 ::ll::TypedStorage<8, 16, ::CallbackToken> mRetrieveCallbackToken;
177 ::ll::TypedStorage<8, 16, ::CallbackToken> mImportCallbackToken;
178 ::ll::TypedStorage<1, 1, bool> mFirstRealmsFetchComplete;
179 ::ll::TypedStorage<1, 1, bool> mFirstUnpairedParentRealmsFetchComplete;
180 ::ll::TypedStorage<4, 4, ::Realms::GenericStatus> mRealmsStatus;
181 ::ll::TypedStorage<4, 4, ::Realms::GenericStatus> mUnpairedParentRealmsStatus;
182 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPlayerCountUpdate;
183 ::ll::TypedStorage<8, 24, ::PlayScreenModel::PlayScreenLevelListCacheObserver> mLevelListCacheObserver;
184 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mTrialModeUpdateSubscription;
185 ::ll::TypedStorage<1, 1, bool> mAreTrialWorldsHidden;
186 ::ll::TypedStorage<1, 1, bool> mIsEditScreenLoading;
187 ::ll::TypedStorage<1, 1, bool> mIsLoadingAdditionalRealmInfo;
188 ::ll::TypedStorage<4, 4, int> mNumRealmsWorldsToQuery;
189 ::ll::TypedStorage<8, 16, ::std::set<::Realms::RealmId>> mWorldsWithDetailedInfo;
190 ::ll::TypedStorage<1, 1, bool> initRequestPendingInvites;
200 virtual ~PlayScreenModel() =
default;
202 virtual int getWorldCount(::WorldType worldType, ::NetworkWorldType networkType)
const ;
204 virtual ::LocalWorldInfo
const* getLocalWorldAtIndex(
int const index)
const ;
206 virtual ::LocalWorldInfo
const* getLocalWorldById(::std::string
const&
id)
const ;
208 virtual bool refresh(::WorldType tabType) ;
212 virtual bool isDirty() const ;
252 ::
std::
string const& newWorldDir,
253 ::
std::function<
void(::Legacy::ImportStatus,
float, ::
std::shared_ptr<::
ImportResult>)> callback
270 int notificationCount,
305 ::
std::
string const& levelId,
306 ::
std::function<
void(::nonstd::expected<
void, ::Bedrock::ErrorInfo<::
std::error_code>>)> onCompleteCallback
326 ::
std::
string const& realmID,
329 ::
std::function<
void(::UploadState, ::Realms::World)> callbackAfterUpload
342 MCNAPI
int $getWorldCount(::WorldType worldType, ::NetworkWorldType networkType) const;
The game spells this as an AsyncImplBase<T> base subobject holding the handle; a member at the same o...
Definition Async.h:13
Definition FilePickerSettings.h:5
Definition ILevelListCache.h:27
Definition IMinecraftEventing.h:152
Definition IWorldsProvider.h:5
Definition WorldImporter.h:7
Definition LevelSettings.h:39
Definition MainMenuScreenModel.h:5
Definition PlayScreenModel.h:16
MCAPI void $onLevelDeleted(::std::string const &levelId)
MCAPI void $onStorageChanged()
MCAPI void $onLevelAdded(::std::string const &levelId, ::LevelListCacheObserver::LevelAddedType type)
MCAPI void $onLevelUpdated(::std::string const &levelId)
Definition PlayScreenModel.h:5
MCAPI void fetchThirdPartyServerWorlds(bool forceFetch)
MCAPI bool supportsEduCloudWorlds() const
MCAPI bool $refresh(::WorldType tabType)
MCAPI void triggerMultiplayerGameRefresh(bool tryToReconnect)
MCAPI void repopulateLocalWorlds()
MCAPI int getRealmWorldCount() const
MCAPI void fetchEduCloudWorlds()
MCAPI void _navigateToEditWorldScreen(::LocalWorldInfo const &info)
MCAPI void navigateToWorldSyncModalScreen(::std::string const &levelId, ::std::function< void(::nonstd::expected< void, ::Bedrock::ErrorInfo<::std::error_code > >)> onCompleteCallback)
MCAPI void fireIgnoredNotificationsEvent(::IMinecraftEventing::IgnoredNotificationsType notificationType, int notificationCount, ::std::set<::IMinecraftEventing::IgnoredNotificationSource > notificationSources)
MCAPI void _sortRealmsWorlds(::std::string const currentUserXUID, ::std::vector<::Realms::World > &worlds)
MCAPI void _startFriendNetworkWorld(::NetworkWorldInfo const &world)
MCAPI void setServerDetailsRequested(bool requested)
MCAPI void uploadLocalWorldFileAtIndex(::std::string const &realmID, int slotIndex, int index, ::std::function< void(::UploadState, ::Realms::World)> callbackAfterUpload)
MCAPI ::std::shared_ptr<::FilePickerSettings > generateFilePickerSettingsForImport()
MCAPI::LocalWorldInfo const * $getLocalWorldById(::std::string const &id) const
MCAPI void _remove3PServersMismatchingEditorMode()
MCAPI bool hasLocalWorldWithId(::std::string const &levelId)
MCAPI void fetchRealmsPlayerCounts()
MCAPI int $getWorldCount(::WorldType worldType, ::NetworkWorldType networkType) const
MCAPI bool areExternalAndRemoteServerSame(::ExternalServer &externalServer, ::PingedCompatibleServer remoteServer)
MCAPI void fetchRealmsWorldsForPlayScreen()
MCAPI void navigateToEditWorldScreen(int index, ::std::function< void(::Core::Path const &)> onErrorCallback)
MCAPI void _populateAdditionalRealmsWorldsInfo()
MCAPI bool $isDirty() const
MCAPI bool getFetchingThirdPartyWorldsInProgress() const
MCAPI void * $ctor(::MinecraftScreenModelContext context)
MCAPI::Bedrock::PubSub::Subscription subscribeToBuildGameList()
MCAPI void _start3PNetworkWorld(::NetworkWorldInfo &world)
MCAPI bool isLocalWorldRealmsPlus(::LocalWorldInfo const &world)
MCAPI void $startLocalWorld(::LocalWorldInfo worldInfo, ::LevelSettings const *settings)
MCAPI void convertLegacyWorld(::LegacyWorldInfo worldInfo, ::std::string const &newWorldDir, ::std::function< void(::Legacy::ImportStatus, float, ::std::shared_ptr<::ImportResult >)> callback)
MCAPI ::Core::PathBuffer<::std::string > const createUniquePathForWorld() const
MCAPI void _populateNetworkWorlds()
MCAPI ::std::vector<::ResourceLocation > getLoadingPacks(::PackType type) const
MCAPI void startNetworkWorld(::NetworkWorldInfo worldInfo, ::NetworkWorldType worldType)
MCAPI::LocalWorldInfo const * $getLocalWorldAtIndex(int const index) const
MCAPI bool isEditorPlaytestRoundtrip() const
MCAPI void _populateRealmsWorldsInternal(bool ofUnpairedParentRealms)
MCAPI void _startRemoteNetworkWorld(::NetworkWorldInfo const &world)
MCAPI void initializeRealmsWorlds()
MCAPI void handleLegacyWorldConversionComplete(::ImportResult const &result)
MCAPI int getOwnedActiveUnpairedParentRealmWorldCount() const
MCAPI::IMinecraftEventing & $getMinecraftEventing() const
MCAPI void _populateLocalWorldsFromStorageSource(::ILevelListCache &levelListCache, ::std::vector<::LocalWorldInfo > &localWorlds, ::std::vector<::LocalWorldInfo > &betaRetailWorlds, bool restrictTrial, bool fireTelemetry)
MCAPI void navigateToAddEditExternalScreen(int id)
MCAPI void updateWorldTimestamp(::NetworkWorldInfo const &worldInfo)
MCAPI::LocalWorldInfo refreshLocalWorldInfo(::LocalWorldInfo const &worldInfo)
MCAPI void deleteLegacyWorld(uint legacyWorldIndex)
Definition ResourceLocation.h:15
Definition MultiplayerGameInfo.h:7
Definition ExternalServer.h:5
Definition ImportResult.h:5
Definition LegacyWorldInfo.h:5
Definition LocalWorldInfo.h:5
Definition DriveItemCollection.h:7
Definition GraphError.h:7
Definition MinecraftScreenModelContext.h:5
Definition NetworkWorldInfo.h:5
Definition PingedCompatibleServer.h:5
Definition PlayScreenModel.h:14
Definition RealmsWorldInfo.h:5
Definition WorldTemplateInfo.h:12