LeviLamina
Loading...
Searching...
No Matches
LevelEventCoordinator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Subscription.h"
7#include "mc/gameplayhandlers/CoordinatorResult.h"
8#include "mc/world/actor/ActorInitializationMethod.h"
9#include "mc/world/events/EventCoordinator.h"
10#include "mc/world/events/EventRef.h"
11#include "mc/world/events/LevelGameplayEvent.h"
12#include "mc/world/events/MutableLevelGameplayEvent.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class EntityContext;
18class GameRules;
23// clang-format on
24
25class LevelEventCoordinator : public ::EventCoordinator<::LevelEventListener> {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelGameplayHandler>> mLevelGameplayHandler;
30 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mGameRuleChangeSubscription;
31 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferencesSubscription;
32 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPostReloadActorAddedSubscription;
33 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserAddedSubscription;
34 // NOLINTEND
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ~LevelEventCoordinator() /*override*/ = default;
40 // NOLINTEND
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI void _onGameplayUserAdded(::EntityContext& entity);
46
47 MCAPI void _postReloadActorAdded(::Actor& actor, ::ActorInitializationMethod);
48
49 MCAPI void registerGameRules(::GameRules& gameRules);
50
51 MCFOLD void registerLevelGameplayHandler(::std::unique_ptr<::LevelGameplayHandler>&& handler);
52
53 MCAPI void registerWithActorManagerEvents(::IActorManagerConnector& actorManagerConnector, bool isClientSide);
54
55 MCAPI void registerWithGameplayUserManagerEvents(::IGameplayUserManagerConnector& gameplayUserManagerConnector);
56
57 MCAPI ::CoordinatorResult sendEvent(::EventRef<::MutableLevelGameplayEvent<::CoordinatorResult>> event);
58
59 MCAPI void sendEvent(::EventRef<::LevelGameplayEvent<void>> const& event);
60
61 MCAPI void sendLevelRemovedActor(::Actor& actor);
62
63 MCAPI void sendLevelWeatherChanged(
64 ::std::string const& dimension,
65 bool wasRaining,
66 bool wasLightning,
67 bool isRaining,
68 bool isLightning
69 );
70 // NOLINTEND
71
72public:
73 // vftables
74 // NOLINTBEGIN
75 MCNAPI static void** $vftable();
76 // NOLINTEND
77};
Definition Actor.h:105
Definition EntityContext.h:16
Definition EventCoordinator.h:6
Definition EventRef.h:6
Definition GameRules.h:24
Definition IActorManagerConnector.h:14
Definition IGameplayUserManagerConnector.h:14
Definition LevelEventCoordinator.h:25
static MCAPI void ** $vftable()
Definition LevelEventListener.h:16
Definition LevelGameplayHandler.h:13
Definition LevelGameplayEvent.h:14
Definition MutableLevelGameplayEvent.h:9