Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LecternBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Direction.h"
7#include "mc/world/level/block/ActorBlockBase.h"
8#include "mc/world/level/block/BlockSupportType.h"
9#include "mc/world/level/block/BlockType.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
17class Player;
18class Vec3;
19namespace BlockEvents { class BlockPlaceEvent; }
20namespace BlockEvents { class BlockPlayerInteractEvent; }
21namespace BlockEvents { class BlockQueuedTickEvent; }
22// clang-format on
23
24class LecternBlock : public ::ActorBlock {
25public:
26 // prevent constructor by default
27 LecternBlock();
28
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ::Block const&
33 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
34 /*override*/;
35
36 virtual bool isInteractiveBlock() const /*override*/;
37
38 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType) const /*override*/;
39
40 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
41 /*override*/;
42
43 virtual ::Block const* playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const
44 /*override*/;
45
46 virtual bool attack(::Player* player, ::BlockPos const& pos) const /*override*/;
47
48 virtual bool hasComparatorSignal() const /*override*/;
49
50 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
51 /*override*/;
52
53 virtual bool isSignalSource() const /*override*/;
54
55 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
56
57 virtual bool requiresLegacyRedstoneSetup() const /*override*/;
58
59 virtual bool
60 shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const
61 /*override*/;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCNAPI LecternBlock(::std::string const& nameId, int id);
68
69 MCNAPI void emitRedstonePulse(::BlockSource& region, ::BlockPos const& pos) const;
70
71 MCNAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
72
73 MCNAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
74
75 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
76 // NOLINTEND
77
78public:
79 // constructor thunks
80 // NOLINTBEGIN
81 MCNAPI void* $ctor(::std::string const& nameId, int id);
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87 MCNAPI ::Block const& $getPlacementBlock(
88 ::Actor const& by,
89 ::BlockPos const& pos,
90 uchar face,
91 ::Vec3 const& clickPos,
92 int itemValue
93 ) const;
94
95 MCNAPI bool $isInteractiveBlock() const;
96
97 MCNAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType) const;
98
99 MCNAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
100
101 MCNAPI ::Block const* $playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const;
102
103 MCAPI bool $attack(::Player* player, ::BlockPos const& pos) const;
104
105 MCNAPI bool $hasComparatorSignal() const;
106
107 MCNAPI int
108 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
109
110 MCNAPI bool $isSignalSource() const;
111
112 MCNAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
113
114 MCNAPI bool $requiresLegacyRedstoneSetup() const;
115
116 MCNAPI bool
117 $shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const;
118
119
120 // NOLINTEND
121
122public:
123 // vftables
124 // NOLINTBEGIN
125 MCNAPI static void** $vftable();
126 // NOLINTEND
127};
Definition Actor.h:116
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:18
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
MCAPI bool $checkIsPathable(::Actor &entity, ::BlockPos const &lastPathPos, ::BlockPos const &pathPos) const
MCAPI bool $isInteractiveBlock() const
MCAPI void emitRedstonePulse(::BlockSource &region, ::BlockPos const &pos) const
MCAPI void onPlace(::BlockEvents::BlockPlaceEvent &eventData) const
MCAPI void $setupRedstoneComponent(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $isSignalSource() const
MCAPI bool $hasComparatorSignal() const
MCAPI::Block const & $getPlacementBlock(::Actor const &by, ::BlockPos const &pos, uchar face, ::Vec3 const &clickPos, int itemValue) const
MCAPI bool $shouldConnectToRedstone(::BlockSource &region, ::BlockPos const &pos, ::Direction::Type direction) const
MCAPI int $getComparatorSignal(::BlockSource &region, ::BlockPos const &pos, ::Block const &block, uchar dir) const
MCAPI bool $canProvideSupport(::Block const &, uchar face, ::BlockSupportType) const
MCAPI LecternBlock(::std::string const &nameId, int id)
static MCAPI void ** $vftable()
MCAPI void * $ctor(::std::string const &nameId, int id)
MCAPI bool $requiresLegacyRedstoneSetup() const
MCAPI void tick(::BlockEvents::BlockQueuedTickEvent &eventData) const
MCAPI::Block const * $playerWillDestroy(::Player &player, ::BlockPos const &pos, ::Block const &block) const
Definition Player.h:131
Definition Vec3.h:10