Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI HopperBlock(::std::string const& nameId, int id);
96
97 MCNAPI ::AABB _getSpoutAABB(::Block const& block) const;
98
100
101 MCNAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
102 // NOLINTEND
103
104public:
105 // static functions
106 // NOLINTBEGIN
107 MCNAPI static void _onSetupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos);
108 // NOLINTEND
109
110public:
111 // static variables
112 // NOLINTBEGIN
113 MCNAPI static ::BaseGameVersion const& HOPPER_DOESNT_BREAK_FALLING_BLOCK_VERSION();
114 // NOLINTEND
115
116public:
117 // constructor thunks
118 // NOLINTBEGIN
119 MCNAPI void* $ctor(::std::string const& nameId, int id);
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125 MCNAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
126
127 MCNAPI bool $isInteractiveBlock() const;
128
129 MCNAPI bool $isContainerBlock() const;
130
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 MCNAPI 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 MCNAPI ::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 MCNAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType) const;
159
160 MCNAPI ::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 MCNAPI bool $hasComparatorSignal() const;
169
170 MCNAPI int
171 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
172
173 MCNAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
174
175 MCNAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
176
177 MCNAPI bool $allowStateMismatchOnPlacement(::Block const& clientTarget, ::Block const& serverTarget) const;
178
179 MCNAPI void $movedByPiston(::BlockSource& region, ::BlockPos const& pos) const;
180
181
182 // NOLINTEND
183
184public:
185 // vftables
186 // NOLINTBEGIN
187 MCNAPI static void** $vftable();
188 // NOLINTEND
189};
Definition AABB.h:18
Definition Actor.h:116
Definition BaseGameVersion.h:8
Definition BlockActor.h:30
Definition BlockPlayerInteractEvent.h:18
Definition BlockRedstoneUpdateEvent.h:15
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:18
static MCAPI void _onSetupRedstoneComponent(::BlockSource &region, ::BlockPos const &pos)
MCAPI void $movedByPiston(::BlockSource &region, ::BlockPos const &pos) const
MCAPI void use(::BlockEvents::BlockPlayerInteractEvent &eventData) const
MCAPI int $getComparatorSignal(::BlockSource &region, ::BlockPos const &pos, ::Block const &block, uchar dir) const
MCAPI bool $addCollisionShapes(::Block const &block, ::IConstBlockSource const &region, ::BlockPos const &pos, ::AABB const *intersectTestBox, ::std::vector<::AABB > &inoutBoxes, ::optional_ref<::GetCollisionShapeInterface const > entity) const
MCAPI void $addAABBs(::Block const &block, ::IConstBlockSource const &region, ::BlockPos const &pos, ::AABB const *intersectTestBox, ::std::vector<::AABB > &inoutBoxes) const
static MCAPI ::BaseGameVersion const & HOPPER_DOESNT_BREAK_FALLING_BLOCK_VERSION()
MCAPI void _onRedstoneUpdate(::BlockEvents::BlockRedstoneUpdateEvent &blockEvent) const
MCAPI::AABB _getSpoutAABB(::Block const &block) const
MCAPI void $onRemove(::BlockSource &region, ::BlockPos const &pos) const
MCAPI bool $isContainerBlock() const
MCAPI bool $canProvideSupport(::Block const &, uchar face, ::BlockSupportType) const
MCAPI bool $breaksFallingBlocks(::Block const &block, ::BaseGameVersion const version) const
MCAPI bool $hasComparatorSignal() const
MCAPI HopperBlock(::std::string const &nameId, int id)
MCAPI bool $isInteractiveBlock() const
MCAPI void * $ctor(::std::string const &nameId, int id)
MCAPI bool $allowStateMismatchOnPlacement(::Block const &clientTarget, ::Block const &serverTarget) const
MCAPI::HitResult $clip(::Block const &block, ::BlockSource const &region, ::BlockPos const &pos, ::Vec3 const &A, ::Vec3 const &B, ::ShapeType shapeType, ::optional_ref<::GetCollisionShapeInterface const > entity) const
MCAPI::ItemInstance $asItemInstance(::Block const &, ::BlockActor const *) const
static MCAPI void ** $vftable()
MCAPI::Block const & $getPlacementBlock(::Actor const &by, ::BlockPos const &pos, uchar face, ::Vec3 const &clickPos, int itemValue) const
Definition IConstBlockSource.h:25
Definition ItemInstance.h:15
Definition Vec3.h:10
Definition optional_ref.h:10