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() = default;
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
39 onBlockDestroyedByPlayer(::Player& player, ::Block const& destroyedBlock, ::BlockPos const& pos, ::ItemStackBase const&, ::ItemStackBase const&);
40
41 // vIndex: 3
42 virtual ::EventResult onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
43
44 // vIndex: 4
45 virtual ::EventResult
46 onBlockMovedByPiston(::BlockPos const& pistonPos, ::BlockPos const& blockPos, ::PistonState const action);
47
48 // vIndex: 5
49 virtual ::EventResult onBlockDestructionStopped(::Player& player, ::BlockPos const& blockPos, int progress);
50
51 // vIndex: 6
52 virtual ::EventResult onBlockDestructionStarted(::Player&, ::BlockPos const&, ::Block const&, uchar const);
53
54 // vIndex: 7
55 virtual ::EventResult onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
56
57 // vIndex: 8
58 virtual ::EventResult
59 onBlockExploded(::Dimension& dimension, ::BlockPos const& blockPos, ::Block const& destroyedBlock, ::Actor* source);
60
61 // vIndex: 9
62 virtual ::EventResult onBlockModified(::BlockPos const& pos, ::Block const& oldBlock, ::Block const& newBlock);
63
64 // vIndex: 10
65 virtual ::EventResult onUnknownBlockReceived(::Level& level, ::NewBlockID const& blockId, ushort data);
66
67 // vIndex: 11
68 virtual ::EventResult onEvent(::BlockNotificationEvent const& event);
69 // NOLINTEND
70
71public:
72 // destructor thunk
73 // NOLINTBEGIN
74
75 // NOLINTEND
76
77public:
78 // virtual function thunks
79 // NOLINTBEGIN
80 MCFOLD ::EventResult
81 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
82
83 MCFOLD ::EventResult
84 $onBlockDestroyedByPlayer(::Player& player, ::Block const& destroyedBlock, ::BlockPos const& pos, ::ItemStackBase const&, ::ItemStackBase const&);
85
86 MCFOLD ::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
87
88 MCFOLD ::EventResult
89 $onBlockMovedByPiston(::BlockPos const& pistonPos, ::BlockPos const& blockPos, ::PistonState const action);
90
91 MCFOLD ::EventResult $onBlockDestructionStopped(::Player& player, ::BlockPos const& blockPos, int progress);
92
93 MCFOLD ::EventResult $onBlockDestructionStarted(::Player&, ::BlockPos const&, ::Block const&, uchar const);
94
95 MCFOLD ::EventResult $onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
96
97 MCFOLD ::EventResult $onBlockExploded(
98 ::Dimension& dimension,
99 ::BlockPos const& blockPos,
100 ::Block const& destroyedBlock,
101 ::Actor* source
102 );
103
104 MCFOLD ::EventResult $onBlockModified(::BlockPos const& pos, ::Block const& oldBlock, ::Block const& newBlock);
105
106 MCFOLD ::EventResult $onUnknownBlockReceived(::Level& level, ::NewBlockID const& blockId, ushort data);
107
108 MCFOLD ::EventResult $onEvent(::BlockNotificationEvent const& event);
109 // NOLINTEND
110
111public:
112 // vftables
113 // NOLINTBEGIN
114 MCAPI static void** $vftable();
115 // NOLINTEND
116};
Definition Actor.h:104
Definition BlockEventListener.h:22
Definition BlockPos.h:18
Definition Block.h:36
Definition Dimension.h:83
Definition ItemStackBase.h:35
Definition Level.h:234
Definition Player.h:119
Definition BlockNotificationEvent.h:63
Definition NewBlockID.h:8