LeviLamina
Loading...
Searching...
No Matches
ScriptBlockGlobalEventListener.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/BlockEventListener.h"
9#include "mc/world/events/EventListenerDispatcher.h"
10#include "mc/world/events/EventResult.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Block;
16class BlockPos;
17class Dimension;
18class ItemStackBase;
19class Player;
20struct ButtonPushEvent;
22struct LeverActionEvent;
28namespace ScriptModuleMinecraft { class IScriptWorldAfterEvents; }
29// clang-format on
30
31namespace ScriptModuleMinecraft {
32
33class ScriptBlockGlobalEventListener : public ::EventListenerDispatcher<::BlockEventListener> {
34public:
35 // ScriptBlockGlobalEventListener inner types declare
36 // clang-format off
37 struct Listener;
38 // clang-format on
39
40 // ScriptBlockGlobalEventListener inner types define
41 struct Listener {
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
46 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::IScriptWorldAfterEvents>>
47 mScriptEventsHandle;
48 // NOLINTEND
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 24, ::std::vector<::ScriptModuleMinecraft::ScriptBlockGlobalEventListener::Listener>>
55 mListeners;
56 // NOLINTEND
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 virtual ::EventResult onEvent(::PistonActionEvent const& eventData) /*override*/;
62
63 virtual ::EventResult onEvent(::LeverActionEvent const& eventData) /*override*/;
64
65 virtual ::EventResult onEvent(::ButtonPushEvent const& eventData) /*override*/;
66
67 virtual ::EventResult onEvent(::PressurePlatePushEvent const& eventData) /*override*/;
68
69 virtual ::EventResult onEvent(::PressurePlatePopEvent const& eventData) /*override*/;
70
71 virtual ::EventResult onEvent(::TripWireTripEvent const& eventData) /*override*/;
72
73 virtual ::EventResult onEvent(::TargetBlockHitEvent const& eventData) /*override*/;
74
75 virtual ::EventResult onEvent(::ExplosionStartedEvent const& eventData) /*override*/;
76
77 virtual ::EventResult onBlockExploded(
78 ::Dimension& dimension,
79 ::BlockPos const& blockPos,
80 ::Block const& destroyedBlock,
81 ::Actor* source
82 ) /*override*/;
83
84 virtual ::EventResult onBlockPlacedByPlayer(
85 ::Player& player,
86 ::Block const& placedBlock,
87 ::BlockPos const& pos,
88 bool isUnderwater
89 ) /*override*/;
90
91 virtual ::EventResult onBlockDestroyedByPlayer(
92 ::Player& player,
93 ::Block const& destroyedBlock,
94 ::BlockPos const& pos,
95 ::ItemStackBase const& currentItem,
96 ::ItemStackBase const& itemBeforeBlockBreak
97 ) /*override*/;
98
99 virtual ::EventResult onBlockDestructionStarted(
100 ::Player& player,
101 ::BlockPos const& pos,
102 ::Block const& hitBlock,
103 uchar const face
104 ) /*override*/;
105
106 virtual ~ScriptBlockGlobalEventListener() /*override*/ = default;
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCAPI ::EventResult $onEvent(::PistonActionEvent const& eventData);
113
114 MCAPI ::EventResult $onEvent(::LeverActionEvent const& eventData);
115
116 MCAPI ::EventResult $onEvent(::ButtonPushEvent const& eventData);
117
118 MCAPI ::EventResult $onEvent(::PressurePlatePushEvent const& eventData);
119
120 MCAPI ::EventResult $onEvent(::PressurePlatePopEvent const& eventData);
121
122 MCAPI ::EventResult $onEvent(::TripWireTripEvent const& eventData);
123
124 MCAPI ::EventResult $onEvent(::TargetBlockHitEvent const& eventData);
125
126 MCAPI ::EventResult $onEvent(::ExplosionStartedEvent const& eventData);
127
128 MCAPI ::EventResult $onBlockExploded(
129 ::Dimension& dimension,
130 ::BlockPos const& blockPos,
131 ::Block const& destroyedBlock,
132 ::Actor* source
133 );
134
135 MCAPI ::EventResult
136 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
137
138 MCAPI ::EventResult $onBlockDestroyedByPlayer(
139 ::Player& player,
140 ::Block const& destroyedBlock,
141 ::BlockPos const& pos,
142 ::ItemStackBase const& currentItem,
143 ::ItemStackBase const& itemBeforeBlockBreak
144 );
145
146 MCAPI ::EventResult
147 $onBlockDestructionStarted(::Player& player, ::BlockPos const& pos, ::Block const& hitBlock, uchar const face);
148
149
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
155 MCNAPI static void** $vftable();
156 // NOLINTEND
157};
158
159} // namespace ScriptModuleMinecraft
Definition Actor.h:105
Definition BlockPos.h:19
Definition Block.h:43
Definition Dimension.h:85
Definition EventListenerDispatcher.h:6
Definition ItemStackBase.h:44
Definition Player.h:125
Definition IScriptWorldAfterEvents.h:68
Definition ScriptBlockGlobalEventListener.h:33
Definition ButtonPushEvent.h:14
Definition ExplosionStartedEvent.h:15
Definition LeverActionEvent.h:14
Definition PistonActionEvent.h:14
Definition PressurePlatePopEvent.h:13
Definition PressurePlatePushEvent.h:14
Definition ScriptBlockGlobalEventListener.h:41
Definition TargetBlockHitEvent.h:15
Definition TripWireTripEvent.h:14