LeviLamina
Loading...
Searching...
No Matches
ScriptFormPromiseTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
8#include "mc/deps/scripting/script_engine/Promise.h"
9#include "mc/world/events/EventListenerDispatcher.h"
10#include "mc/world/events/EventResult.h"
11
12// auto generated forward declare list
13// clang-format off
17class Player;
22namespace Json { class Value; }
23namespace ScriptModuleMinecraftServerUI { class ScriptActionFormResponse; }
24namespace ScriptModuleMinecraftServerUI { class ScriptFormRejectError; }
25namespace ScriptModuleMinecraftServerUI { class ScriptMessageFormResponse; }
26namespace ScriptModuleMinecraftServerUI { class ScriptMessageFormResponseV2; }
27namespace ScriptModuleMinecraftServerUI { class ScriptModalFormResponse; }
28// clang-format on
29
31 public ::EventListenerDispatcher<::PlayerEventListener>,
32 public ::EventListenerDispatcher<::LevelEventListener> {
33public:
34 // ScriptFormPromiseTracker inner types declare
35 // clang-format off
36 struct FromRequest;
37 // clang-format on
38
39 // ScriptFormPromiseTracker inner types define
40 struct FromRequest {
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<
45 8,
46 88,
47 ::std::variant<
51 void>,
55 void>,
59 void>,
63 void>>>
64 mPromise;
65 ::ll::TypedStorage<8, 160, ::NetworkIdentifier> mClientNetworkIdentifier;
66 // NOLINTEND
67
68 public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI ~FromRequest();
72 // NOLINTEND
73
74 public:
75 // destructor thunk
76 // NOLINTBEGIN
77 MCFOLD void $dtor();
78 // NOLINTEND
79 };
80
81public:
82 // member variables
83 // NOLINTBEGIN
84 ::ll::TypedStorage<8, 8, ::LevelEventCoordinator&> mLevelEventCoordinator;
85 ::ll::TypedStorage<8, 8, ::ServerPlayerEventCoordinator&> mPlayerEventCoordinator;
86 ::ll::TypedStorage<4, 4, uint> mLastRequestId;
87 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint, ::ScriptFormPromiseTracker::FromRequest>> mFormRequests;
88 // NOLINTEND
89
90public:
91 // virtual functions
92 // NOLINTBEGIN
93 // vIndex: 61
94 virtual ::EventResult onEvent(::PlayerFormResponseEvent const& formResponseEvent) /*override*/;
95
96 // vIndex: 62
97 virtual ::EventResult onEvent(::PlayerFormCloseEvent const& formCloseEvent) /*override*/;
98
99 // vIndex: 0
100 virtual ~ScriptFormPromiseTracker() /*override*/;
101
102 // vIndex: 3
103 virtual ::EventResult onLevelRemovedPlayer(::Player& player) /*override*/;
104 // NOLINTEND
105
106public:
107 // member functions
108 // NOLINTBEGIN
109 MCAPI void handleFormResponse(uint formId, ::Json::Value const& formResponse);
110
111 MCAPI void handlePlayerQuit(::NetworkIdentifier const& playerId);
112 // NOLINTEND
113
114public:
115 // static functions
116 // NOLINTBEGIN
117 MCAPI static void _sendToClient(::Player const& player, ::Json::Value formJson, uint formId);
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123 MCAPI void $dtor();
124 // NOLINTEND
125
126public:
127 // virtual function thunks
128 // NOLINTBEGIN
129 MCAPI ::EventResult $onEvent(::PlayerFormResponseEvent const& formResponseEvent);
130
131 MCAPI ::EventResult $onEvent(::PlayerFormCloseEvent const& formCloseEvent);
132
133 MCAPI ::EventResult $onLevelRemovedPlayer(::Player& player);
134 // NOLINTEND
135
136public:
137 // vftables
138 // NOLINTBEGIN
139 MCAPI static void** $vftableForEnableNonOwnerReferences();
140
141 MCAPI static void** $vftableForEventListenerDispatcherLevelEventListener();
142
143 MCAPI static void** $vftableForEventListenerDispatcherPlayerEventListener();
144 // NOLINTEND
145};
Definition EnableNonOwnerReferences.h:7
Definition EventListenerDispatcher.h:6
Definition Value.h:16
Definition LevelEventCoordinator.h:25
Definition LevelEventListener.h:16
Definition NetworkIdentifier.h:11
Definition PlayerEventListener.h:29
Definition Player.h:119
Definition ScriptFormPromiseTracker.h:32
Definition ScriptFormRejectError.h:12
Definition Promise.h:8
Definition StrongTypedObjectHandle.h:8
Definition ServerPlayerEventCoordinator.h:8
Definition PlayerFormCloseEvent.h:14
Definition PlayerFormResponseEvent.h:14
Definition ScriptFormPromiseTracker.h:40