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