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 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 // virtual function thunks
78 // NOLINTBEGIN
79 MCNAPI ::EventResult
80 $onBlockPlacedByPlayer(::Player& player, ::Block const& placedBlock, ::BlockPos const& pos, bool isUnderwater);
81
82 MCNAPI ::EventResult $onBlockDestroyedByPlayer(
83 ::Player& player,
84 ::Block const& destroyedBlock,
85 ::BlockPos const& pos,
86 ::ItemStackBase const&,
87 ::ItemStackBase const&
88 );
89
90 MCNAPI ::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player& player, ::BlockPos const& pos);
91
92 MCNAPI ::EventResult
93 $onBlockMovedByPiston(::BlockPos const& pistonPos, ::BlockPos const& blockPos, ::PistonState const action);
94
95 MCNAPI ::EventResult $onBlockDestructionStopped(::Player& player, ::BlockPos const& blockPos, int progress);
96
97 MCNAPI ::EventResult $onBlockDestructionStarted(::Player&, ::BlockPos const&, ::Block const&, uchar const);
98
99 MCNAPI ::EventResult $onBlockInteractedWith(::Player& player, ::BlockPos const& blockPos);
100
101 MCNAPI ::EventResult $onBlockExploded(
102 ::Dimension& dimension,
103 ::BlockPos const& blockPos,
104 ::Block const& destroyedBlock,
105 ::Actor* source
106 );
107
108 MCNAPI ::EventResult $onBlockModified(::BlockPos const& pos, ::Block const& oldBlock, ::Block const& newBlock);
109
110 MCNAPI ::EventResult $onUnknownBlockReceived(::Level& level, ::NewBlockID const& blockId, ushort data);
111
112 MCNAPI ::EventResult $onEvent(::BlockNotificationEvent const& event);
113 // NOLINTEND
114
115public:
116 // vftables
117 // NOLINTBEGIN
118 MCNAPI static void** $vftable();
119 // NOLINTEND
120};
Definition Actor.h:103
Definition BlockEventListener.h:22
MCAPI::EventResult $onBlockModified(::BlockPos const &pos, ::Block const &oldBlock, ::Block const &newBlock)
MCAPI::EventResult $onBlockPlacedByPlayer(::Player &player, ::Block const &placedBlock, ::BlockPos const &pos, bool isUnderwater)
MCAPI::EventResult $onBlockInteractedWith(::Player &player, ::BlockPos const &blockPos)
MCAPI::EventResult $onUnknownBlockReceived(::Level &level, ::NewBlockID const &blockId, ushort data)
MCAPI::EventResult $onBlockMovedByPiston(::BlockPos const &pistonPos, ::BlockPos const &blockPos, ::PistonState const action)
MCAPI::EventResult $onEvent(::BlockNotificationEvent const &event)
static MCAPI void ** $vftable()
MCAPI::EventResult $onBlockExploded(::Dimension &dimension, ::BlockPos const &blockPos, ::Block const &destroyedBlock, ::Actor *source)
MCAPI::EventResult $onBlockDestroyedByPlayer(::Player &player, ::Block const &destroyedBlock, ::BlockPos const &pos, ::ItemStackBase const &, ::ItemStackBase const &)
MCAPI::EventResult $onBlockInPosWillBeDestroyedByPlayer(::Player &player, ::BlockPos const &pos)
MCAPI::EventResult $onBlockDestructionStarted(::Player &, ::BlockPos const &, ::Block const &, uchar const)
MCAPI::EventResult $onBlockDestructionStopped(::Player &player, ::BlockPos const &blockPos, int progress)
Definition BlockPos.h:18
Definition Block.h:38
Definition Dimension.h:83
Definition ItemStackBase.h:35
Definition Level.h:238
Definition Player.h:119
Definition BlockNotificationEvent.h:63
Definition NewBlockID.h:8