Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ChiseledBookshelfBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/HandSlot.h"
7#include "mc/world/level/block/FaceDirectionalActorBlock.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class BlockActor;
13class BlockPos;
14class BlockSource;
16class ItemInstance;
17class ItemStack;
18class Player;
19class Vec3;
20namespace BlockEvents { class BlockPlayerInteractEvent; }
21// clang-format on
22
24public:
25 // ChiseledBookshelfBlock inner types define
26 enum class SlotState : int {
27 Free = 0,
28 Occupied = 1,
29 Invalid = 2,
30 };
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual bool isInteractiveBlock() const /*override*/;
36
37 virtual bool hasComparatorSignal() const /*override*/;
38
39 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
40 /*override*/;
41
42 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
43
44 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI void _setBook(
51 ::Player& player,
52 ::ItemStack heldItem,
53 ::ChiseledBookshelfBlockActor& bookshelfActor,
54 int hitSlot,
55 ::HandSlot handSlot
56 ) const;
57
58 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
59 // NOLINTEND
60
61public:
62 // static functions
63 // NOLINTBEGIN
64 MCAPI static bool _retrieveBook(::Player& player, ::ChiseledBookshelfBlockActor& bookshelfActor, int const hitSlot);
65
66#ifdef LL_PLAT_C
67 MCNAPI static ::ChiseledBookshelfBlock::SlotState
68 getBlockSlotState(::BlockPos const& blockPos, ::Vec3 const& blockHit, uchar faceHit, ::BlockSource const& region);
69#endif
70 // NOLINTEND
71
72public:
73 // virtual function thunks
74 // NOLINTBEGIN
75 MCNAPI bool $isInteractiveBlock() const;
76
77 MCNAPI bool $hasComparatorSignal() const;
78
79 MCNAPI int
80 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
81
82 MCNAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
83
84 MCNAPI ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
85
86
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
92 MCNAPI static void** $vftable();
93 // NOLINTEND
94};
Definition BlockActor.h:30
Definition BlockPlayerInteractEvent.h:18
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition ChiseledBookshelfBlockActor.h:22
Definition ChiseledBookshelfBlock.h:23
MCAPI bool $isInteractiveBlock() const
static MCAPI void ** $vftable()
MCAPI void $onRemove(::BlockSource &region, ::BlockPos const &pos) const
MCAPI::ItemInstance $asItemInstance(::Block const &block, ::BlockActor const *) const
MCAPI int $getComparatorSignal(::BlockSource &region, ::BlockPos const &pos, ::Block const &block, uchar dir) const
MCAPI bool $hasComparatorSignal() const
Definition FaceDirectionalActorBlock.h:18
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Player.h:131
Definition Vec3.h:10