LeviLamina
Loading...
Searching...
No Matches
ScriptLevelEventListener.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 ScriptLevelEventListener : public ::EventListenerDispatcher<::LevelEventListener> {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
29 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::IScriptWorldAfterEvents>>
30 mScriptEventsHandle;
31 ::ll::TypedStorage<1, 1, bool> mAfterListener;
32 // NOLINTEND
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 // vIndex: 12
38 virtual ::EventResult onEvent(::LevelGameRuleChangeEvent const& event) /*override*/;
39
40 // vIndex: 11
41 virtual ::EventResult onEvent(::ScriptingWorldInitializeEvent const& scriptingInitializedEvent) /*override*/;
42
43 // vIndex: 5
44 virtual ::EventResult onLevelTick(::Level&) /*override*/;
45
46 // vIndex: 2
47 virtual ::EventResult onLevelAddedPlayer(::Player& player) /*override*/;
48
49 // vIndex: 3
50 virtual ::EventResult onLevelRemovedPlayer(::Player& player) /*override*/;
51
52 // vIndex: 8
53 virtual ::EventResult onLevelWeatherChange(
54 ::std::string const& dimension,
55 bool wasRaining,
56 bool wasLightning,
57 bool isRaining,
58 bool isLightning
59 ) /*override*/;
60
61 // vIndex: 4
62 virtual ::EventResult onLevelRemovedActor(::Actor& actor) /*override*/;
63
64 // vIndex: 0
65 virtual ~ScriptLevelEventListener() /*override*/ = default;
66 // NOLINTEND
67
68public:
69 // virtual function thunks
70 // NOLINTBEGIN
71 MCAPI ::EventResult $onEvent(::LevelGameRuleChangeEvent const& event);
72
73 MCAPI ::EventResult $onEvent(::ScriptingWorldInitializeEvent const& scriptingInitializedEvent);
74
75 MCAPI ::EventResult $onLevelTick(::Level&);
76
77 MCAPI ::EventResult $onLevelAddedPlayer(::Player& player);
78
79 MCAPI ::EventResult $onLevelRemovedPlayer(::Player& player);
80
81 MCAPI ::EventResult $onLevelWeatherChange(
82 ::std::string const& dimension,
83 bool wasRaining,
84 bool wasLightning,
85 bool isRaining,
86 bool isLightning
87 );
88
89 MCAPI ::EventResult $onLevelRemovedActor(::Actor& actor);
90 // NOLINTEND
91
92public:
93 // vftables
94 // NOLINTBEGIN
95 MCNAPI static void** $vftable();
96 // NOLINTEND
97};
98
99} // namespace ScriptModuleMinecraft
Definition Actor.h:102
Definition EventListenerDispatcher.h:6
Definition Level.h:243
Definition Player.h:123
Definition ScriptLevelEventListener.h:24
Definition LevelGameRuleChangeEvent.h:9
Definition ScriptingWorldInitializeEvent.h:16