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
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class Block;
12class BlockLegacy;
13class BlockPos;
14class BlockSource;
15class Container;
16class Experiments;
17class ItemStack;
18class Player;
19class Random;
20class Vec3;
21namespace BlockEvents { class BlockPlaceEvent; }
22// clang-format on
23
25public:
26 // virtual functions
27 // NOLINTBEGIN
28 // vIndex: 118
29 virtual int getVariant(::Block const& block) const /*override*/;
30
31 // vIndex: 121
32 virtual uchar getMappedFace(uchar face, ::Block const& block) const /*override*/;
33
34 // vIndex: 92
35 virtual ::Block const&
36 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
37 /*override*/;
38
39 // vIndex: 132
40 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
41
42 // vIndex: 139
43 virtual bool use(::Player& player, ::BlockPos const& pos, uchar) const /*override*/;
44
45 // vIndex: 138
46 virtual bool isInteractiveBlock() const /*override*/;
47
48 // vIndex: 29
49 virtual bool isContainerBlock() const /*override*/;
50
51 // vIndex: 67
52 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
53
54 // vIndex: 61
55 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
56 /*override*/;
57
58 // vIndex: 105
59 virtual bool hasComparatorSignal() const /*override*/;
60
61 // vIndex: 106
62 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
63 /*override*/;
64
65 // vIndex: 136
66 virtual void tick(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const /*override*/;
67
68 // vIndex: 150
69 virtual int getTickDelay() const;
70
71 // vIndex: 141
72 virtual bool allowStateMismatchOnPlacement(::Block const& clientTarget, ::Block const& serverTarget) const
73 /*override*/;
74
75 // vIndex: 151
76 virtual void dispenseFrom(::BlockSource& region, ::BlockPos const& pos) const;
77
78 // vIndex: 131
79 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
80
81 // vIndex: 0
82 virtual ~DispenserBlock() /*override*/ = default;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI void ejectItem(
89 ::BlockSource& region,
90 ::Vec3 const& pos,
91 uchar face,
92 ::ItemStack const& item,
93 ::Container& container,
94 int slot,
95 int countLimit
96 ) const;
97
98 MCAPI ::Vec3 getDispensePosition(::BlockSource& region, ::Vec3 const& pos) const;
99
100 MCFOLD void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
101 // NOLINTEND
102
103public:
104 // static functions
105 // NOLINTBEGIN
106 MCAPI static void dropAllItemsFromContainer(::BlockSource& region, ::BlockPos const& pos);
107
108 MCAPI static void
109 ejectItem(::BlockSource& region, ::Vec3 const& pos, uchar face, ::ItemStack const& item, int countLimit);
110
111 MCAPI static void openInventoryContainer(::Player& player, ::BlockPos const& pos);
112 // NOLINTEND
113
114public:
115 // destructor thunk
116 // NOLINTBEGIN
117
118 // NOLINTEND
119
120public:
121 // virtual function thunks
122 // NOLINTBEGIN
123 MCAPI int $getVariant(::Block const& block) const;
124
125 MCAPI uchar $getMappedFace(uchar face, ::Block const& block) const;
126
127 MCAPI ::Block const&
128 $getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue)
129 const;
130
131 MCFOLD void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
132
133 MCFOLD bool $use(::Player& player, ::BlockPos const& pos, uchar) const;
134
135 MCFOLD bool $isInteractiveBlock() const;
136
137 MCFOLD bool $isContainerBlock() const;
138
139 MCFOLD void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
140
141 MCAPI void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
142
143 MCFOLD bool $hasComparatorSignal() const;
144
145 MCFOLD int
146 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
147
148 MCAPI void $tick(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
149
150 MCFOLD int $getTickDelay() const;
151
152 MCFOLD bool $allowStateMismatchOnPlacement(::Block const& clientTarget, ::Block const& serverTarget) const;
153
154 MCAPI void $dispenseFrom(::BlockSource& region, ::BlockPos const& pos) const;
155
156 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
157 // NOLINTEND
158
159public:
160 // vftables
161 // NOLINTBEGIN
162 MCAPI static void** $vftable();
163 // NOLINTEND
164};
Definition ActorBlockBase.h:6
Definition Actor.h:104
Definition BlockPlaceEvent.h:15
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition Container.h:30
Definition DispenserBlock.h:24
Definition Experiments.h:14
Definition ItemStack.h:25
Definition Player.h:119
Definition Random.h:16
Definition Vec3.h:10