3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/events/NetworkType.h"
9#include "mc/world/actor/player/persona/ProfileType.h"
10#include "mc/world/events/EventListenerDispatcher.h"
11#include "mc/world/events/EventResult.h"
12#include "mc/world/events/ItemEventListener.h"
13#include "mc/world/events/PlayerEventListener.h"
26namespace OreUI {
class Router; }
31class GameplayUIClient :
public ::EventListenerDispatcher<::PlayerEventListener>,
32 public ::EventListenerDispatcher<::ItemEventListener> {
36 ::ll::TypedStorage<8, 8, ::GameplayUI::GameplayUIContext&> mContext;
37 ::ll::TypedStorage<8, 8, ::OreUI::Router&> mRouter;
38 ::ll::TypedStorage<8, 8, ::IOptions&> mOptions;
39 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ISceneStack const>> mSceneStack;
40 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mConnectedSubscription;
45 GameplayUIClient& operator=(GameplayUIClient
const&);
46 GameplayUIClient(GameplayUIClient
const&);
52 virtual ::EventResult onEvent(::PlayerNotificationEvent
const& event) ;
54 virtual ::EventResult onPlayerCreated(
55 ::LocalPlayer& player,
56 ::persona::ProfileType personaSlot,
57 ::std::string
const& classicSkinId,
58 bool usingClassicSkin,
59 ::NetworkType networkType
62 virtual ::EventResult onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player) ;
64 virtual ::EventResult onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player) ;
66 virtual ::EventResult onLocalPlayerOpenInventory(::IClientInstance&, ::LocalPlayer& localPlayer) ;
69 onLocalPlayerOpenTrading(::IClientInstance&, ::LocalPlayer&, ::ActorUniqueID
const& uniqueID,
bool) ;
72 onPreviewItemPopulatedInContainer(::ItemStackBase
const& item, ::std::string
const& dstContainerName) ;
74 virtual ::EventResult onShowDataDrivenScreen(
76 ::std::string
const& screenId,
78 ::std::optional<uint> dataInstanceId
81 virtual ::EventResult onCloseDataDrivenScreen(::LocalPlayer&, uint formId) ;
83 virtual ::EventResult onCloseAllDataDrivenScreens(::LocalPlayer&) ;
85 virtual ~GameplayUIClient() =
default;
91 MCAPI
void onLeaveWorld();
93 MCAPI
void setupGameServerConnectionListener(::GameConnectionConnector
const& gameConnectionConnector);
101 MCAPI ::EventResult $onEvent(::PlayerNotificationEvent
const& event);
103 MCAPI ::EventResult $onPlayerCreated(
104 ::LocalPlayer& player,
105 ::persona::ProfileType personaSlot,
106 ::std::string
const& classicSkinId,
107 bool usingClassicSkin,
108 ::NetworkType networkType
111 MCAPI ::EventResult $onLocalPlayerDeath(::IClientInstance& client, ::LocalPlayer& player);
113 MCAPI ::EventResult $onLocalPlayerRespawn(::IClientInstance& client, ::LocalPlayer& player);
115 MCAPI ::EventResult $onLocalPlayerOpenInventory(::IClientInstance&, ::LocalPlayer& localPlayer);
118 $onLocalPlayerOpenTrading(::IClientInstance&, ::LocalPlayer&, ::ActorUniqueID
const& uniqueID,
bool);
121 $onPreviewItemPopulatedInContainer(::ItemStackBase
const& item, ::std::string
const& dstContainerName);
123 MCAPI ::EventResult $onShowDataDrivenScreen(
125 ::std::string
const& screenId,
127 ::std::optional<uint> dataInstanceId
130 MCAPI ::EventResult $onCloseDataDrivenScreen(::LocalPlayer&, uint formId);
132 MCAPI ::EventResult $onCloseAllDataDrivenScreens(::LocalPlayer&);
Definition GameplayUIClient.h:7
static MCAPI void ** $vftableForEventListenerDispatcherPlayerEventListener()
static MCAPI void ** $vftableForEventListenerDispatcherItemEventListener()
Definition IClientInstance.h:5
Definition ISceneStack.h:5
Definition ItemStackBase.h:44
Definition LocalPlayer.h:5
Definition ActorUniqueID.h:5
Definition GameConnectionConnector.h:5
Definition GameplayUIContext.h:7
Definition PlayerNotificationEvent.h:130