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/optional_ref.h"
8#include "mc/deps/core/utility/pub_sub/Publisher.h"
9#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
10#include "mc/editor/serviceproviders/EditorPlayerServiceProvider.h"
11#include "mc/editor/services/EditorServiceList.h"
12#include "mc/world/events/EventListenerDispatcher.h"
13#include "mc/world/events/EventResult.h"
14#include "mc/world/events/PlayerEventListener.h"
15
16// auto generated forward declare list
17// clang-format off
18class Player;
20struct DimensionType;
22namespace Bedrock::PubSub { class Subscription; }
23namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
24namespace Editor { class ServiceProviderCollection; }
25namespace Editor { struct EditorInitParams; }
26// clang-format on
27
28namespace Editor {
29
30class EditorPlayerCommon : public ::Editor::IEditorPlayer,
33 public ::EventListenerDispatcher<::PlayerEventListener> {
34public:
35 // member variables
36 // NOLINTBEGIN
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 EditorPlayerCommon& operator=(EditorPlayerCommon const&);
49 EditorPlayerCommon(EditorPlayerCommon const&);
50 EditorPlayerCommon();
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual ~EditorPlayerCommon() /*override*/;
56
57 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
58
59 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
60
61 virtual ::Scripting::Result_deprecated<void> start() /*override*/;
62
63 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
64
65 virtual bool canStart() const /*override*/;
66
67 virtual bool isStarted() const /*override*/;
68
69 virtual ::Bedrock::PubSub::Subscription registerInitializationStateChanged(
70 ::std::function<
71 void(::Editor::IEditorPlayer::InitializationState, ::Editor::IEditorPlayer::InitializationState)> fn
72 ) /*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 ::EventResult onEvent(::PlayerDimensionChangeAfterEvent const& evt) /*override*/;
89
90 virtual void _onTick() /*override*/;
91 // NOLINTEND
92
93public:
94 // member functions
95 // NOLINTBEGIN
96 MCNAPI EditorPlayerCommon(::Player& player, ::gsl::not_null<::Editor::EditorInitParams*> initParams);
97 // NOLINTEND
98
99public:
100 // constructor thunks
101 // NOLINTBEGIN
102 MCNAPI void* $ctor(::Player& player, ::gsl::not_null<::Editor::EditorInitParams*> initParams);
103 // NOLINTEND
104
105public:
106 // destructor thunk
107 // NOLINTBEGIN
108 MCNAPI void $dtor();
109 // NOLINTEND
110
111public:
112 // virtual function thunks
113 // NOLINTBEGIN
114 MCNAPI ::Scripting::Result_deprecated<void> $init();
115
116 MCNAPI ::Scripting::Result_deprecated<void> $ready();
117
118 MCNAPI ::Scripting::Result_deprecated<void> $start();
119
120 MCNAPI ::Scripting::Result_deprecated<void> $quit();
121
122 MCNAPI bool $canStart() const;
123
124 MCNAPI bool $isStarted() const;
125
126 MCNAPI ::Bedrock::PubSub::Subscription $registerInitializationStateChanged(
127 ::std::function<
128 void(::Editor::IEditorPlayer::InitializationState, ::Editor::IEditorPlayer::InitializationState)> fn
129 );
130
131 MCNAPI ::Editor::ServiceProviderCollection& $getServiceProviders();
132
133 MCNAPI ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
135
136 MCNAPI ::Bedrock::PubSub::Subscription
138
139 MCNAPI ::Player* $getPlayer() const;
140
141 MCNAPI ::EventResult $onPlayerTick(::Player& player);
142
143 MCNAPI ::EventResult $onEvent(::PlayerDimensionChangeAfterEvent const& evt);
144
145 MCNAPI void $_onTick();
146
147
148 // NOLINTEND
149
150public:
151 // vftables
152 // NOLINTBEGIN
153 MCNAPI static void** $vftableForEditorServiceList();
154
156
158
159 MCNAPI static void** $vftableForIEditorPlayer();
160 // NOLINTEND
161};
162
163} // namespace Editor
Definition Subscription.h:10
MCAPI bool $isStarted() const
static MCAPI void ** $vftableForEventListenerDispatcher()
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI EditorPlayerCommon(::Player &player, ::gsl::not_null<::Editor::EditorInitParams * > initParams)
MCAPI ::Scripting::Result_deprecated< void > $init()
MCAPI ::Scripting::Result_deprecated< void > $start()
MCAPI::Bedrock::PubSub::Subscription $registerInitializationStateChanged(::std::function< void(::Editor::IEditorPlayer::InitializationState, ::Editor::IEditorPlayer::InitializationState)> fn)
MCAPI::Bedrock::PubSub::Subscription $registerDimensionChange(::std::function< void(::DimensionType, ::DimensionType)> fn)
MCAPI bool $canStart() const
MCAPI::EventResult $onEvent(::PlayerDimensionChangeAfterEvent const &evt)
static MCAPI void ** $vftableForEditorServiceList()
MCAPI void * $ctor(::Player &player, ::gsl::not_null<::Editor::EditorInitParams * > initParams)
static MCAPI void ** $vftableForEditorPlayerServiceProvider()
MCAPI::EventResult $onPlayerTick(::Player &player)
MCAPI ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription > $registerTickSubscriber(::std::function< void(::Editor::ServiceProviderCollection &)> fnTick)
MCAPI ::Scripting::Result_deprecated< void > $ready()
MCAPI::Editor::ServiceProviderCollection & $getServiceProviders()
MCAPI::Player * $getPlayer() const
static MCAPI void ** $vftableForIEditorPlayer()
Definition EditorPlayerServiceProvider.h:18
Definition IEditorPlayer.h:17
Definition ServiceProviderCollection.h:7
Definition EditorServiceList.h:16
Definition EventListenerDispatcher.h:6
Definition PlayerEventCoordinator.h:20
Definition Player.h:129
Definition DimensionType.h:5
Definition EditorInitParams.h:7
Definition PlayerDimensionChangeAfterEvent.h:15
Definition Alias.h:14