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; }
20// clang-format on
21
22namespace ScriptModuleMinecraft {
23
24class ScriptLevelGlobalEventListener : public ::EventListenerDispatcher<::LevelEventListener> {
25public:
26 // ScriptLevelGlobalEventListener inner types declare
27 // clang-format off
28 struct Listener;
29 // clang-format on
30
31 // ScriptLevelGlobalEventListener inner types define
32 struct Listener {
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
37 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::IScriptWorldAfterEvents>>
38 mScriptEventsHandle;
39 ::ll::TypedStorage<1, 1, bool> mIsV010;
40 // NOLINTEND
41 };
42
43public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptLevelGlobalEventListener::Listener>>
47 mListeners;
48 // NOLINTEND
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 virtual ::EventResult onEvent(::ScriptingWorldInitializeEvent const& eventData) /*override*/;
54
55 virtual ::EventResult onEvent(::LevelGameRuleChangeEvent const& eventData) /*override*/;
56
57 virtual ::EventResult onLevelTick(::Level& level) /*override*/;
58
59 virtual ::EventResult onLevelAddedPlayer(::Player& player) /*override*/;
60
61 virtual ::EventResult onLevelRemovedPlayer(::Player& player) /*override*/;
62
63 virtual ::EventResult onLevelWeatherChange(
64 ::std::string const& dimension,
65 bool wasRaining,
66 bool wasLightning,
67 bool isRaining,
68 bool isLightning
69 ) /*override*/;
70
71 virtual ::EventResult onLevelRemovedActor(::Actor& actor) /*override*/;
72
73 virtual ~ScriptLevelGlobalEventListener() /*override*/ = default;
74 // NOLINTEND
75
76public:
77 // virtual function thunks
78 // NOLINTBEGIN
79 MCAPI ::EventResult $onEvent(::ScriptingWorldInitializeEvent const& eventData);
80
81 MCAPI ::EventResult $onEvent(::LevelGameRuleChangeEvent const& eventData);
82
83 MCAPI ::EventResult $onLevelTick(::Level& level);
84
85 MCAPI ::EventResult $onLevelAddedPlayer(::Player& player);
86
87 MCAPI ::EventResult $onLevelRemovedPlayer(::Player& player);
88
89 MCAPI ::EventResult $onLevelWeatherChange(
90 ::std::string const& dimension,
91 bool wasRaining,
92 bool wasLightning,
93 bool isRaining,
94 bool isLightning
95 );
96
97 MCAPI ::EventResult $onLevelRemovedActor(::Actor& actor);
98
99
100 // NOLINTEND
101
102public:
103 // vftables
104 // NOLINTBEGIN
105 MCNAPI static void** $vftable();
106 // NOLINTEND
107};
108
109} // namespace ScriptModuleMinecraft
Definition Actor.h:105
Definition EventListenerDispatcher.h:6
Definition Level.h:249
Definition Player.h:125
Definition IScriptWorldAfterEvents.h:68
Definition ScriptLevelGlobalEventListener.h:24
Definition LevelGameRuleChangeEvent.h:10
Definition ScriptLevelGlobalEventListener.h:32
Definition ScriptingWorldInitializeEvent.h:16