LeviLamina
Loading...
Searching...
No Matches
EditorPlayerCommon.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/IEditorPlayer.h"
7#include "mc/deps/core/utility/AutomaticID.h"
8#include "mc/deps/core/utility/optional_ref.h"
9#include "mc/deps/core/utility/pub_sub/Publisher.h"
10#include "mc/deps/scripting/runtime/Result_deprecated.h"
11#include "mc/editor/serviceproviders/EditorPlayerServiceProvider.h"
12#include "mc/editor/services/EditorServiceList.h"
13#include "mc/world/events/EventListenerDispatcher.h"
14#include "mc/world/events/EventResult.h"
15#include "mc/world/events/PlayerEventListener.h"
16
17// auto generated forward declare list
18// clang-format off
19class Dimension;
20class Player;
23namespace Bedrock::PubSub { class Subscription; }
24namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
25namespace Editor { class ServiceProviderCollection; }
26// clang-format on
27
28namespace Editor {
29
30class EditorPlayerCommon : public ::Editor::IEditorPlayer,
33 public ::EventListenerDispatcher<::PlayerEventListener> {
34public:
35 // EditorPlayerCommon inner types define
36 enum class InitializationState : int {
37 Uninitialized = 0,
38 Initializing = 1,
39 Initialized = 2,
40 Readying = 3,
41 Ready = 4,
42 Deinitializing = 5,
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
53 // NOLINTEND
54
55public:
56 // prevent constructor by default
57 EditorPlayerCommon& operator=(EditorPlayerCommon const&);
58 EditorPlayerCommon(EditorPlayerCommon const&);
59 EditorPlayerCommon();
60
61public:
62 // virtual functions
63 // NOLINTBEGIN
64 virtual ::EventResult onEvent(::PlayerDimensionChangeAfterEvent const& evt) /*override*/;
65
66 virtual ~EditorPlayerCommon() /*override*/;
67
68 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
69
70 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
71
72 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
73
74 virtual ::Editor::ServiceProviderCollection& getServiceProviders() /*override*/;
75
76 virtual ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
77 registerTickSubscriber(::std::function<void(::Editor::ServiceProviderCollection&)> fnTick) /*override*/;
78
79 virtual ::Bedrock::PubSub::Subscription
80 registerDimensionChange(::std::function<void(::DimensionType, ::DimensionType)> fn) /*override*/;
81
82 virtual ::Player* getPlayer() const /*override*/;
83
84 virtual ::optional_ref<::PlayerEventCoordinator> getPlayerEventCoordinator() = 0;
85
86 virtual ::EventResult onPlayerTick(::Player& player) /*override*/;
87
88 virtual void _onTick() /*override*/;
89 // NOLINTEND
90
91public:
92 // member functions
93 // NOLINTBEGIN
94 MCNAPI explicit EditorPlayerCommon(::Player& player);
95 // NOLINTEND
96
97public:
98 // constructor thunks
99 // NOLINTBEGIN
100 MCNAPI void* $ctor(::Player& player);
101 // NOLINTEND
102
103public:
104 // destructor thunk
105 // NOLINTBEGIN
106 MCNAPI void $dtor();
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCNAPI ::EventResult $onEvent(::PlayerDimensionChangeAfterEvent const& evt);
113
114 MCNAPI ::Scripting::Result_deprecated<void> $init();
115
116 MCNAPI ::Scripting::Result_deprecated<void> $ready();
117
118 MCNAPI ::Scripting::Result_deprecated<void> $quit();
119
120 MCNAPI ::Editor::ServiceProviderCollection& $getServiceProviders();
121
122 MCNAPI ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
124
125 MCNAPI ::Bedrock::PubSub::Subscription
126 $registerDimensionChange(::std::function<void(::DimensionType, ::DimensionType)> fn);
127
128 MCNAPI ::Player* $getPlayer() const;
129
130 MCNAPI ::EventResult $onPlayerTick(::Player& player);
131
132 MCNAPI void $_onTick();
133
134
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCNAPI static void** $vftableForEditorServiceList();
141
143
145
146 MCNAPI static void** $vftableForIEditorPlayer();
147 // NOLINTEND
148};
149
150} // namespace Editor
Definition Subscription.h:10
Definition Dimension.h:85
static MCAPI void ** $vftableForEventListenerDispatcher()
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI ::Scripting::Result_deprecated< void > $init()
MCAPI::Bedrock::PubSub::Subscription $registerDimensionChange(::std::function< void(::DimensionType, ::DimensionType)> fn)
MCAPI::EventResult $onEvent(::PlayerDimensionChangeAfterEvent const &evt)
MCAPI void * $ctor(::Player &player)
static MCAPI void ** $vftableForEditorServiceList()
static MCAPI void ** $vftableForEditorPlayerServiceProvider()
MCAPI::EventResult $onPlayerTick(::Player &player)
MCAPI ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription > $registerTickSubscriber(::std::function< void(::Editor::ServiceProviderCollection &)> fnTick)
MCAPI EditorPlayerCommon(::Player &player)
MCAPI ::Scripting::Result_deprecated< void > $ready()
MCAPI::Editor::ServiceProviderCollection & $getServiceProviders()
MCAPI::Player * $getPlayer() const
static MCAPI void ** $vftableForIEditorPlayer()
Definition EditorPlayerServiceProvider.h:19
Definition IEditorPlayer.h:16
Definition ServiceProviderCollection.h:7
Definition EditorServiceList.h:16
Definition EventListenerDispatcher.h:6
Definition PlayerEventCoordinator.h:22
Definition Player.h:125
Definition PlayerDimensionChangeAfterEvent.h:16
Definition Alias.h:14