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