LeviLamina
Loading...
Searching...
No Matches
BlockEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/events/EventResult.h"
7#include "mc/world/level/block/actor/PistonState.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Block;
13class BlockPos;
14class Dimension;
15class ItemStackBase;
16class Level;
17class Player;
19struct NewBlockID;
20// clang-format on
21
23public:
24 // BlockEventListener inner types define
26
27public:
28 // virtual functions
29 // NOLINTBEGIN
30 // vIndex: 0
31 virtual ~BlockEventListener();
32
33 // vIndex: 1
34 virtual ::EventResult
35 onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
36
37 // vIndex: 2
38 virtual ::EventResult onBlockDestroyedByPlayer(
39 ::Player& player,
40 ::Block const& destroyedBlock,
41 ::BlockPos const& pos,
42 ::ItemStackBase const&,
43 ::ItemStackBase const&
44 );
45
46 // vIndex: 3
47 virtual ::EventResult onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
48
49 // vIndex: 4
50 virtual ::EventResult
51 onBlockMovedByPiston(::BlockPos const& pistonPos, ::BlockPos const& blockPos, ::PistonState const action);
52
53 // vIndex: 5
54 virtual ::EventResult onBlockDestructionStopped(::Player& player, ::BlockPos const& blockPos, int progress);
55
56 // vIndex: 6
57 virtual ::EventResult onBlockDestructionStarted(::Player&, ::BlockPos const&, ::Block const&, uchar const);
58
59 // vIndex: 7
60 virtual ::EventResult onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
61
62 // vIndex: 8
63 virtual ::EventResult
64 onBlockExploded(::Dimension& dimension, ::BlockPos const& blockPos, ::Block const& destroyedBlock, ::Actor* source);
65
66 // vIndex: 9
67 virtual ::EventResult onBlockModified(::BlockPos const& pos, ::Block const& oldBlock, ::Block const& newBlock);
68
69 // vIndex: 10
70 virtual ::EventResult onUnknownBlockReceived(::Level& level, ::NewBlockID const& blockId, ushort data);
71
72 // vIndex: 11
73 virtual ::EventResult onEvent(::BlockNotificationEvent const& event);
74 // NOLINTEND
75
76public:
77 // destructor thunk
78 // NOLINTBEGIN
79 MCAPI void $dtor();
80 // NOLINTEND
81
82public:
83 // virtual function thunks
84 // NOLINTBEGIN
85 MCFOLD ::EventResult
86 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
87
88 MCFOLD ::EventResult $onBlockDestroyedByPlayer(
89 ::Player& player,
90 ::Block const& destroyedBlock,
91 ::BlockPos const& pos,
92 ::ItemStackBase const&,
93 ::ItemStackBase const&
94 );
95
96 MCFOLD ::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
97
98 MCFOLD ::EventResult
99 $onBlockMovedByPiston(::BlockPos const& pistonPos, ::BlockPos const& blockPos, ::PistonState const action);
100
101 MCFOLD ::EventResult $onBlockDestructionStopped(::Player& player, ::BlockPos const& blockPos, int progress);
102
103 MCFOLD ::EventResult $onBlockDestructionStarted(::Player&, ::BlockPos const&, ::Block const&, uchar const);
104
105 MCFOLD ::EventResult $onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
106
107 MCFOLD ::EventResult $onBlockExploded(
108 ::Dimension& dimension,
109 ::BlockPos const& blockPos,
110 ::Block const& destroyedBlock,
111 ::Actor* source
112 );
113
114 MCFOLD ::EventResult $onBlockModified(::BlockPos const& pos, ::Block const& oldBlock, ::Block const& newBlock);
115
116 MCFOLD ::EventResult $onUnknownBlockReceived(::Level& level, ::NewBlockID const& blockId, ushort data);
117
118 MCFOLD ::EventResult $onEvent(::BlockNotificationEvent const& event);
119 // NOLINTEND
120
121public:
122 // vftables
123 // NOLINTBEGIN
124 MCNAPI static void** $vftable();
125 // NOLINTEND
126};
Definition Actor.h:102
Definition BlockEventListener.h:22
static MCAPI void ** $vftable()
Definition BlockPos.h:14
Definition Block.h:45
Definition Dimension.h:85
Definition ItemStackBase.h:38
Definition Level.h:246
Definition Player.h:118
Definition BlockNotificationEvent.h:46
Definition NewBlockID.h:5