LeviLamina
Loading...
Searching...
No Matches
ScriptLevelGlobalEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/lifetime_registry/TypedObjectHandle.h"
7#include "mc/deps/scripting/lifetime_registry/WeakLifetimeScope.h"
8#include "mc/world/events/EventListenerDispatcher.h"
9#include "mc/world/events/EventResult.h"
10#include "mc/world/events/LevelEventListener.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Level;
16class Player;
19namespace ScriptModuleMinecraft { class IScriptWorldAfterEvents; }
20namespace ScriptModuleMinecraft { class ScriptV010Events; }
21namespace ScriptModuleMinecraft { class ScriptWorldAfterEvents; }
22// clang-format on
23
24namespace ScriptModuleMinecraft {
25
26class ScriptLevelGlobalEventListener : public ::EventListenerDispatcher<::LevelEventListener> {
27public:
28 // ScriptLevelGlobalEventListener inner types declare
29 // clang-format off
30 struct Listener;
31 // clang-format on
32
33 // ScriptLevelGlobalEventListener inner types define
34 struct Listener {
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
39 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::IScriptWorldAfterEvents>>
40 mScriptEventsHandle;
41 ::ll::TypedStorage<1, 1, bool> mIsV010;
42 // NOLINTEND
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptLevelGlobalEventListener::Listener>>
49 mListeners;
50 // NOLINTEND
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual ::EventResult onEvent(::ScriptingWorldInitializeEvent const& eventData) /*override*/;
56
57 virtual ::EventResult onEvent(::LevelGameRuleChangeEvent const& eventData) /*override*/;
58
59 virtual ::EventResult onLevelTick(::Level& level) /*override*/;
60
61 virtual ::EventResult onLevelAddedPlayer(::Player& player) /*override*/;
62
63 virtual ::EventResult onLevelRemovedPlayer(::Player& player) /*override*/;
64
65 virtual ::EventResult onLevelWeatherChange(
66 ::std::string const& dimension,
67 bool wasRaining,
68 bool wasLightning,
69 bool isRaining,
70 bool isLightning
71 ) /*override*/;
72
73 virtual ::EventResult onLevelRemovedActor(::Actor& actor) /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCFOLD void registerListener(
82 );
83
84 MCFOLD void registerListener(
87 );
88
89 MCFOLD void
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCAPI ::EventResult $onEvent(::ScriptingWorldInitializeEvent const& eventData);
97
98 MCAPI ::EventResult $onEvent(::LevelGameRuleChangeEvent const& eventData);
99
100 MCAPI ::EventResult $onLevelTick(::Level& level);
101
102 MCAPI ::EventResult $onLevelAddedPlayer(::Player& player);
103
104 MCAPI ::EventResult $onLevelRemovedPlayer(::Player& player);
105
106 MCAPI ::EventResult $onLevelWeatherChange(
107 ::std::string const& dimension,
108 bool wasRaining,
109 bool wasLightning,
110 bool isRaining,
111 bool isLightning
112 );
113
114 MCAPI ::EventResult $onLevelRemovedActor(::Actor& actor);
115
116
117 // NOLINTEND
118
119public:
120 // vftables
121 // NOLINTBEGIN
122 MCNAPI static void** $vftable();
123 // NOLINTEND
124};
125
126} // namespace ScriptModuleMinecraft
Definition Actor.h:125
Definition EventListenerDispatcher.h:6
Definition Level.h:255
Definition Player.h:137
Definition IScriptWorldAfterEvents.h:73
Definition ScriptLevelGlobalEventListener.h:26
Definition ScriptV010Events.h:61
Definition ScriptWorldAfterEvents.h:94
Definition WeakLifetimeScope.h:14
Definition LevelGameRuleChangeEvent.h:10
Definition ScriptLevelGlobalEventListener.h:34
Definition ScriptingWorldInitializeEvent.h:16
Definition TypedObjectHandle.h:8