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