LeviLamina
Loading...
Searching...
No Matches
ScriptBlockEventListener.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 Block;
15class BlockPos;
16class ItemStackBase;
17class Player;
18struct ButtonPushEvent;
20struct LeverActionEvent;
26namespace ScriptModuleMinecraft { class IScriptWorldAfterEvents; }
27// clang-format on
28
29namespace ScriptModuleMinecraft {
30
31class ScriptBlockEventListener : public ::EventListenerDispatcher<::BlockEventListener> {
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 16, ::Scripting::TypedObjectHandle<::ScriptModuleMinecraft::IScriptWorldAfterEvents>>
36 mScriptEventsHandle;
37 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
38 // NOLINTEND
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 // vIndex: 22
44 virtual ::EventResult onEvent(::PistonActionEvent const& pistonActionEvent) /*override*/;
45
46 // vIndex: 21
47 virtual ::EventResult onEvent(::LeverActionEvent const& leverActionEvent) /*override*/;
48
49 // vIndex: 20
50 virtual ::EventResult onEvent(::ButtonPushEvent const& buttonPushEvent) /*override*/;
51
52 // vIndex: 19
53 virtual ::EventResult onEvent(::PressurePlatePushEvent const& pressurePlatePushEvent) /*override*/;
54
55 // vIndex: 18
56 virtual ::EventResult onEvent(::PressurePlatePopEvent const& pressurePlatePopEvent) /*override*/;
57
58 // vIndex: 16
59 virtual ::EventResult onEvent(::TripWireTripEvent const& tripWireTripEvent) /*override*/;
60
61 // vIndex: 17
62 virtual ::EventResult onEvent(::TargetBlockHitEvent const& targetBlockHitEvent) /*override*/;
63
64 // vIndex: 13
65 virtual ::EventResult onEvent(::ExplosionStartedEvent const& explosionStartedEvent) /*override*/;
66
67 // vIndex: 1
68 virtual ::EventResult onBlockPlacedByPlayer(
69 ::Player& player,
70 ::Block const& placedBlock,
71 ::BlockPos const& pos,
72 bool isUnderwater
73 ) /*override*/;
74
75 // vIndex: 2
76 virtual ::EventResult onBlockDestroyedByPlayer(
77 ::Player& player,
78 ::Block const& destroyedBlock,
79 ::BlockPos const& pos,
80 ::ItemStackBase const& currentItem,
81 ::ItemStackBase const& itemBeforeBlockBreak
82 ) /*override*/;
83
84 // vIndex: 6
85 virtual ::EventResult onBlockDestructionStarted(
86 ::Player& player,
87 ::BlockPos const& pos,
88 ::Block const& hitBlock,
89 uchar const face
90 ) /*override*/;
91
92 // vIndex: 0
93 virtual ~ScriptBlockEventListener() /*override*/ = default;
94 // NOLINTEND
95
96public:
97 // virtual function thunks
98 // NOLINTBEGIN
99 MCAPI ::EventResult $onEvent(::PistonActionEvent const& pistonActionEvent);
100
101 MCAPI ::EventResult $onEvent(::LeverActionEvent const& leverActionEvent);
102
103 MCAPI ::EventResult $onEvent(::ButtonPushEvent const& buttonPushEvent);
104
105 MCAPI ::EventResult $onEvent(::PressurePlatePushEvent const& pressurePlatePushEvent);
106
107 MCAPI ::EventResult $onEvent(::PressurePlatePopEvent const& pressurePlatePopEvent);
108
109 MCAPI ::EventResult $onEvent(::TripWireTripEvent const& tripWireTripEvent);
110
111 MCAPI ::EventResult $onEvent(::TargetBlockHitEvent const& targetBlockHitEvent);
112
113 MCAPI ::EventResult $onEvent(::ExplosionStartedEvent const& explosionStartedEvent);
114
115 MCAPI ::EventResult
116 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
117
118 MCAPI ::EventResult $onBlockDestroyedByPlayer(
119 ::Player& player,
120 ::Block const& destroyedBlock,
121 ::BlockPos const& pos,
122 ::ItemStackBase const& currentItem,
123 ::ItemStackBase const& itemBeforeBlockBreak
124 );
125
126 MCAPI ::EventResult
127 $onBlockDestructionStarted(::Player& player, ::BlockPos const& pos, ::Block const& hitBlock, uchar const face);
128 // NOLINTEND
129
130public:
131 // vftables
132 // NOLINTBEGIN
133 MCNAPI static void** $vftable();
134 // NOLINTEND
135};
136
137} // namespace ScriptModuleMinecraft
Definition BlockPos.h:17
Definition Block.h:37
Definition EventListenerDispatcher.h:6
Definition ItemStackBase.h:34
Definition Player.h:123
Definition ScriptBlockEventListener.h:31
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 TargetBlockHitEvent.h:15
Definition TripWireTripEvent.h:14