LeviLamina
Loading...
Searching...
No Matches
DispenserBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/ActorBlockBase.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Block;
13class BlockPos;
14class BlockSource;
15class Container;
16class ItemStack;
17class Player;
18class Vec3;
19namespace BlockEvents { class BlockPlayerInteractEvent; }
20namespace BlockEvents { class BlockQueuedTickEvent; }
21namespace BlockEvents { class BlockRedstoneUpdateEvent; }
22// clang-format on
23
24class DispenserBlock : public ::ActorBlock {
25public:
26 // prevent constructor by default
27 DispenserBlock();
28
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual int getVariant(::Block const& block) const /*override*/;
33
34 virtual uchar getMappedFace(uchar face, ::Block const& block) const /*override*/;
35
36 virtual ::Block const&
37 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
38 /*override*/;
39
40 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
41
42 virtual bool isInteractiveBlock() const /*override*/;
43
44 virtual bool isContainerBlock() const /*override*/;
45
46 virtual bool hasComparatorSignal() const /*override*/;
47
48 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
49 /*override*/;
50
51 virtual int getTickDelay() const;
52
53 virtual bool allowStateMismatchOnPlacement(::Block const&, ::Block const&) const /*override*/;
54
55 virtual void dispenseFrom(::BlockSource& region, ::BlockPos const& pos) const;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI DispenserBlock(::std::string const& nameId, int id);
62
63 MCAPI void _onRedstoneUpdate(::BlockEvents::BlockRedstoneUpdateEvent& blockEvent) const;
64
65 MCAPI void ejectItem(
66 ::BlockSource& region,
67 ::Vec3 const& pos,
68 uchar face,
69 ::ItemStack const& item,
70 ::Container& container,
71 int slot,
72 int countLimit
73 ) const;
74
75 MCAPI ::Vec3 getDispensePosition(::BlockSource& region, ::Vec3 const& pos) const;
76
77 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
78
79 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
80 // NOLINTEND
81
82public:
83 // static functions
84 // NOLINTBEGIN
85 MCAPI static void dropAllItemsFromContainer(::BlockSource& region, ::BlockPos const& pos);
86
87 MCAPI static void
88 ejectItem(::BlockSource& region, ::Vec3 const& pos, uchar face, ::ItemStack const& item, int countLimit);
89
90 MCAPI static void openInventoryContainer(::Player& player, ::BlockPos const& pos);
91 // NOLINTEND
92
93public:
94 // constructor thunks
95 // NOLINTBEGIN
96 MCAPI void* $ctor(::std::string const& nameId, int id);
97 // NOLINTEND
98
99public:
100 // virtual function thunks
101 // NOLINTBEGIN
102 MCAPI int $getVariant(::Block const& block) const;
103
104 MCAPI uchar $getMappedFace(uchar face, ::Block const& block) const;
105
106 MCFOLD ::Block const& $getPlacementBlock(
107 ::Actor const& by,
108 ::BlockPos const& pos,
109 uchar face,
110 ::Vec3 const& clickPos,
111 int itemValue
112 ) const;
113
114 MCFOLD void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
115
116 MCFOLD bool $isInteractiveBlock() const;
117
118 MCFOLD bool $isContainerBlock() const;
119
120 MCFOLD bool $hasComparatorSignal() const;
121
122 MCFOLD int
123 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
124
125 MCFOLD int $getTickDelay() const;
126
127 MCFOLD bool $allowStateMismatchOnPlacement(::Block const&, ::Block const&) const;
128
129 MCAPI void $dispenseFrom(::BlockSource& region, ::BlockPos const& pos) const;
130
131
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCAPI static void** $vftable();
138 // NOLINTEND
139};
Definition Actor.h:125
Definition BlockPlayerInteractEvent.h:20
Definition BlockQueuedTickEvent.h:18
Definition BlockRedstoneUpdateEvent.h:16
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Container.h:34
Definition ItemStack.h:35
Definition Player.h:137
Definition Vec3.h:10