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;
21class Level;
24struct GameRuleId;
25// clang-format on
26
27class LevelEventCoordinator : public ::EventCoordinator<::LevelEventListener> {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LevelGameplayHandler>> mLevelGameplayHandler;
32 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mGameRuleChangeSubscription;
33 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferencesSubscription;
34 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mPostReloadActorAddedSubscription;
35 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserAddedSubscription;
36 // NOLINTEND
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual ~LevelEventCoordinator() /*override*/;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI LevelEventCoordinator();
48
49 MCAPI void _onGameRuleChange(::GameRules const& gameRules, ::GameRuleId const& gameRuleId);
50
51 MCAPI void _onGameplayUserAdded(::EntityContext& entity);
52
53 MCAPI void _postReloadActorAdded(::Actor& actor, ::ActorInitializationMethod);
54
55 MCFOLD ::LevelGameplayHandler& getLevelGameplayHandler();
56
57 MCAPI void registerGameRules(::GameRules& gameRules);
58
59 MCFOLD void registerLevelGameplayHandler(::std::unique_ptr<::LevelGameplayHandler>&& handler);
60
61 MCAPI void registerWithActorManagerEvents(::IActorManagerConnector& actorManagerConnector, bool isClientSide);
62
63 MCAPI void registerWithGameplayUserManagerEvents(::IGameplayUserManagerConnector& gameplayUserManagerConnector);
64
65 MCAPI ::CoordinatorResult sendEvent(::EventRef<::MutableLevelGameplayEvent<::CoordinatorResult>> event);
66
67 MCAPI void sendEvent(::EventRef<::LevelGameplayEvent<void>> const& event);
68
69 MCAPI void sendLevelInitialized(::Level& level);
70
71 MCAPI void sendLevelRemovedActor(::Actor& actor);
72
73 MCAPI void sendLevelTick(::Level& level);
74
75 MCAPI void sendLevelTickEnd(::Level& level);
76
77 MCAPI void sendLevelTickStart(::Level& level);
78
79 MCAPI void sendLevelWeatherChanged(
80 ::std::string const& dimension,
81 bool wasRaining,
82 bool wasLightning,
83 bool isRaining,
84 bool isLightning
85 );
86 // NOLINTEND
87
88public:
89 // constructor thunks
90 // NOLINTBEGIN
91 MCAPI void* $ctor();
92 // NOLINTEND
93
94public:
95 // destructor thunk
96 // NOLINTBEGIN
97 MCAPI void $dtor();
98 // NOLINTEND
99
100public:
101 // vftables
102 // NOLINTBEGIN
103 MCNAPI static void** $vftable();
104 // NOLINTEND
105};
Definition Actor.h:125
Definition EntityContext.h:17
Definition EventCoordinator.h:6
Definition EventRef.h:6
Definition GameRules.h:24
Definition IActorManagerConnector.h:14
Definition IGameplayUserManagerConnector.h:14
static MCAPI void ** $vftable()
Definition LevelEventListener.h:16
Definition LevelGameplayHandler.h:13
Definition Level.h:255
Definition GameRuleId.h:8
Definition LevelGameplayEvent.h:14
Definition MutableLevelGameplayEvent.h:9