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_deprecated.h"
7#include "mc/editor/services/IEditorService.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 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_deprecated<void> init() /*override*/;
33
34 // vIndex: 3
35 virtual ::Scripting::Result_deprecated<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 MCNAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData>
56 _fillDestroyAction(::BlockSource const& region, ::BlockPos const& pos) const;
57
58 MCNAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData>
59 _fillPlacedAction(::BlockSource const& region, ::BlockPos const& pos) const;
60 // NOLINTEND
61
62public:
63 // virtual function thunks
64 // NOLINTBEGIN
65 MCNAPI ::Scripting::Result_deprecated<void> $init();
66
67 MCNAPI ::Scripting::Result_deprecated<void> $quit();
68
69 MCNAPI ::std::string_view $getServiceName() const;
70
71 MCNAPI ::EventResult
72 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
73
74 MCNAPI ::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
75 // NOLINTEND
76
77public:
78 // vftables
79 // NOLINTBEGIN
80 MCNAPI static void** $vftableForIEditorService();
81
82 MCNAPI static void** $vftableForEventListenerDispatcher();
83 // NOLINTEND
84};
85
86} // namespace Editor::Services
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition BlockEventListenerService.h:24
MCAPI ::Scripting::Result_deprecated< void > $init()
static MCAPI void ** $vftableForEventListenerDispatcher()
MCAPI::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player &player, ::BlockPos const &pos)
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI::std::string_view $getServiceName() const
MCAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData > _fillDestroyAction(::BlockSource const &region, ::BlockPos const &pos) const
MCAPI ::std::vector<::Editor::Transactions::BlockChangedOperationData > _fillPlacedAction(::BlockSource const &region, ::BlockPos const &pos) const
static MCAPI void ** $vftableForIEditorService()
MCAPI::EventResult $onBlockPlacedByPlayer(::Player &player, ::Block const &placedBlock, ::BlockPos const &pos, bool isUnderwater)
Definition IEditorService.h:11
Definition EventListenerDispatcher.h:6
Definition Player.h:119