LeviLamina
Loading...
Searching...
No Matches
HopperBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/world/level/ShapeType.h"
8#include "mc/world/level/block/ActorBlockBase.h"
9#include "mc/world/level/block/BlockLegacy.h"
10#include "mc/world/level/block/BlockSupportType.h"
11
12// auto generated forward declare list
13// clang-format off
14class AABB;
15class Actor;
16class BaseGameVersion;
17class Block;
18class BlockActor;
19class BlockPos;
20class BlockSource;
21class Experiments;
23class HitResult;
25class ItemInstance;
26class Vec3;
27namespace BlockEvents { class BlockPlaceEvent; }
28namespace BlockEvents { class BlockPlayerInteractEvent; }
29// clang-format on
30
31class HopperBlock : public ::ActorBlock {
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 // vIndex: 131
36 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
37
38 // vIndex: 66
39 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
40
41 // vIndex: 60
42 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
43 /*override*/;
44
45 // vIndex: 136
46 virtual bool isInteractiveBlock() const /*override*/;
47
48 // vIndex: 28
49 virtual bool isContainerBlock() const /*override*/;
50
51 // vIndex: 7
52 virtual bool addCollisionShapes(
53 ::Block const& block,
54 ::IConstBlockSource const& region,
55 ::BlockPos const& pos,
56 ::AABB const* intersectTestBox,
57 ::std::vector<::AABB>& inoutBoxes,
59 ) const /*override*/;
60
61 // vIndex: 8
62 virtual void addAABBs(
63 ::Block const& block,
64 ::IConstBlockSource const& region,
65 ::BlockPos const& pos,
66 ::AABB const* intersectTestBox,
67 ::std::vector<::AABB>& inoutBoxes
68 ) const /*override*/;
69
70 // vIndex: 4
71 virtual ::HitResult clip(
72 ::Block const& block,
73 ::BlockSource const& region,
74 ::BlockPos const& pos,
75 ::Vec3 const& A,
76 ::Vec3 const& B,
77 ::ShapeType shapeType,
79 ) const /*override*/;
80
81 // vIndex: 22
82 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType) const /*override*/;
83
84 // vIndex: 91
85 virtual ::Block const&
86 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
87 /*override*/;
88
89 // vIndex: 104
90 virtual bool hasComparatorSignal() const /*override*/;
91
92 // vIndex: 105
93 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
94 /*override*/;
95
96 // vIndex: 89
97 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
98
99 // vIndex: 83
100 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
101
102 // vIndex: 137
103 virtual bool allowStateMismatchOnPlacement(::Block const& clientTarget, ::Block const& serverTarget) const
104 /*override*/;
105
106 // vIndex: 130
107 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
108
109 // vIndex: 0
110 virtual ~HopperBlock() /*override*/ = default;
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
116 MCAPI ::AABB _getSpoutAABB(::Block const& block) const;
117
118 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
119
120 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
121 // NOLINTEND
122
123public:
124 // static variables
125 // NOLINTBEGIN
126 MCAPI static ::BaseGameVersion const& HOPPER_DOESNT_BREAK_FALLING_BLOCK_VERSION();
127 // NOLINTEND
128
129public:
130 // virtual function thunks
131 // NOLINTBEGIN
132 MCAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
133
134 MCAPI 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 $isInteractiveBlock() const;
139
140 MCFOLD bool $isContainerBlock() const;
141
142 MCFOLD bool $addCollisionShapes(
143 ::Block const& block,
144 ::IConstBlockSource const& region,
145 ::BlockPos const& pos,
146 ::AABB const* intersectTestBox,
147 ::std::vector<::AABB>& inoutBoxes,
149 ) const;
150
151 MCAPI void $addAABBs(
152 ::Block const& block,
153 ::IConstBlockSource const& region,
154 ::BlockPos const& pos,
155 ::AABB const* intersectTestBox,
156 ::std::vector<::AABB>& inoutBoxes
157 ) const;
158
159 MCAPI ::HitResult $clip(
160 ::Block const& block,
161 ::BlockSource const& region,
162 ::BlockPos const& pos,
163 ::Vec3 const& A,
164 ::Vec3 const& B,
165 ::ShapeType shapeType,
167 ) const;
168
169 MCFOLD bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType) const;
170
171 MCAPI ::Block const& $getPlacementBlock(
172 ::Actor const& by,
173 ::BlockPos const& pos,
174 uchar face,
175 ::Vec3 const& clickPos,
176 int itemValue
177 ) const;
178
179 MCFOLD bool $hasComparatorSignal() const;
180
181 MCFOLD int
182 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
183
184 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
185
186 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
187
188 MCFOLD bool $allowStateMismatchOnPlacement(::Block const& clientTarget, ::Block const& serverTarget) const;
189
190 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
191 // NOLINTEND
192
193public:
194 // vftables
195 // NOLINTBEGIN
196 MCNAPI static void** $vftable();
197 // NOLINTEND
198};
Definition AABB.h:18
Definition ActorBlockBase.h:6
Definition Actor.h:103
Definition BaseGameVersion.h:8
Definition BlockActor.h:32
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:17
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:19
Definition HopperBlock.h:31
static MCAPI void ** $vftable()
Definition IConstBlockSource.h:24
Definition ItemInstance.h:16
Definition Vec3.h:10
Definition optional_ref.h:10