LeviLamina
Loading...
Searching...
No Matches
BlockEventListenerService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/runtime/Result.h"
7#include "mc/editor/services/IEditorService.h"
8#include "mc/world/events/EventListenerDispatcher.h"
9#include "mc/world/events/EventResult.h"
10
11// auto generated forward declare list
12// clang-format off
13class Block;
15class BlockPos;
16class BlockSource;
17class Player;
18namespace Editor::Transactions { struct BlockChangedOperationData; }
19// clang-format on
20
21namespace Editor::Services {
22
24 public ::EventListenerDispatcher<::BlockEventListener> {
25public:
26 // virtual functions
27 // NOLINTBEGIN
28 // vIndex: 0
29 virtual ~BlockEventListenerService() /*override*/ = default;
30
31 // vIndex: 1
32 virtual ::Scripting::Result<void> init() /*override*/;
33
34 // vIndex: 3
35 virtual ::Scripting::Result<void> quit() /*override*/;
36
37 // vIndex: 4
38 virtual ::std::string_view getServiceName() const /*override*/;
39
40 // vIndex: 1
41 virtual ::EventResult onBlockPlacedByPlayer(
42 ::Player& player,
43 ::Block const& placedBlock,
44 ::BlockPos const& pos,
45 bool isUnderwater
46 ) /*override*/;
47
48 // vIndex: 3
49 virtual ::EventResult onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos) /*override*/;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData>
56 _fillDestroyAction(::BlockSource const& region, ::BlockPos const& pos) const;
57
58 MCAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData>
59 _fillPlacedAction(::BlockSource const& region, ::BlockPos const& pos) const;
60 // NOLINTEND
61
62public:
63 // destructor thunk
64 // NOLINTBEGIN
65
66 // NOLINTEND
67
68public:
69 // virtual function thunks
70 // NOLINTBEGIN
71 MCAPI ::Scripting::Result<void> $init();
72
73 MCAPI ::Scripting::Result<void> $quit();
74
75 MCAPI ::std::string_view $getServiceName() const;
76
77 MCAPI ::EventResult
78 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
79
80 MCAPI ::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
81 // NOLINTEND
82
83public:
84 // vftables
85 // NOLINTBEGIN
86 MCAPI static void** $vftableForIEditorService();
87
88 MCAPI static void** $vftableForEventListenerDispatcher();
89 // NOLINTEND
90};
91
92} // namespace Editor::Services
Definition BlockEventListener.h:22
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition BlockEventListenerService.h:24
Definition IEditorService.h:11
Definition EventListenerDispatcher.h:6
Definition Player.h:119