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