LeviLamina
Loading...
Searching...
No Matches
ButtonBlock.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/Direction.h"
8#include "mc/world/level/block/BlockLegacy.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
17class Experiments;
20class Vec3;
21namespace BlockEvents { class BlockPlaceEvent; }
22namespace BlockEvents { class BlockPlayerInteractEvent; }
23namespace BlockEvents { class BlockQueuedTickEvent; }
24// clang-format on
25
26class ButtonBlock : public ::BlockLegacy {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<1, 1, bool const> mSensitive;
31 // NOLINTEND
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 // vIndex: 5
37 virtual ::AABB getCollisionShape(
38 ::Block const& block,
40 ::BlockPos const& pos,
42 ) const /*override*/;
43
44 // vIndex: 9
45 virtual ::AABB const&
46 getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const
47 /*override*/;
48
49 // vIndex: 11
50 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
51
52 // vIndex: 12
53 virtual ::AABB const& getUIShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
54
55 // vIndex: 8
56 virtual void addAABBs(
57 ::Block const& block,
58 ::IConstBlockSource const& region,
59 ::BlockPos const& pos,
60 ::AABB const* intersectTestBox,
61 ::std::vector<::AABB>& inoutBoxes
62 ) const /*override*/;
63
64 // vIndex: 66
65 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
66
67 // vIndex: 79
68 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar facing) const /*override*/;
69
70 // vIndex: 78
71 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
72
73 // vIndex: 86
74 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
75 /*override*/;
76
77 // vIndex: 91
78 virtual ::Block const&
79 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
80 /*override*/;
81
82 // vIndex: 145
83 virtual void entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor&) const /*override*/;
84
85 // vIndex: 93
86 virtual bool isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const
87 /*override*/;
88
89 // vIndex: 53
90 virtual bool
91 shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const
92 /*override*/;
93
94 // vIndex: 135
95 virtual bool isInteractiveBlock() const /*override*/;
96
97 // vIndex: 43
98 virtual bool isSignalSource() const /*override*/;
99
100 // vIndex: 117
101 virtual int getVariant(::Block const& block) const /*override*/;
102
103 // vIndex: 118
104 virtual bool canSpawnOn(::Actor*) const /*override*/;
105
106 // vIndex: 39
107 virtual bool isButtonBlock() const /*override*/;
108
109 // vIndex: 56
110 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
111 /*override*/;
112
113 // vIndex: 137
114 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
115
116 // vIndex: 130
117 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
118
119 // vIndex: 144
120 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
121
122 // vIndex: 0
123 virtual ~ButtonBlock() /*override*/ = default;
124 // NOLINTEND
125
126public:
127 // member functions
128 // NOLINTBEGIN
129 MCAPI void
130 _buttonUnpressed(::BlockSource& region, ::Block const& buttonBlock, ::Vec3 const& pos, ::Actor* sourceActor) const;
131
132 MCAPI void _checkPressed(::BlockSource& region, ::BlockPos const& pos) const;
133
134 MCAPI ::AABB _getShape(bool pressed, uchar facingDirection, bool ignorePressedState) const;
135
136 MCAPI void
137 buttonPressed(::BlockSource& region, ::Block const& buttonBlock, ::Vec3 const& pos, ::Actor* sourceActor) const;
138
139 MCFOLD void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
140
141 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
142
143 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
144 // NOLINTEND
145
146public:
147 // static functions
148 // NOLINTBEGIN
149 MCAPI static bool canAttachTo(::BlockSource& region, ::BlockPos const& pos, uchar facing);
150 // NOLINTEND
151
152public:
153 // virtual function thunks
154 // NOLINTBEGIN
155 MCAPI ::AABB $getCollisionShape(
156 ::Block const& block,
157 ::IConstBlockSource const&,
158 ::BlockPos const& pos,
160 ) const;
161
162 MCAPI ::AABB const&
163 $getOutline(::Block const& block, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const;
164
165 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
166
167 MCAPI ::AABB const& $getUIShape(::Block const& block, ::AABB& bufferAABB) const;
168
169 MCAPI void $addAABBs(
170 ::Block const& block,
171 ::IConstBlockSource const& region,
172 ::BlockPos const& pos,
173 ::AABB const* intersectTestBox,
174 ::std::vector<::AABB>& inoutBoxes
175 ) const;
176
177 MCAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
178
179 MCFOLD bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar facing) const;
180
181 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
182
183 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
184
185 MCFOLD ::Block const& $getPlacementBlock(
186 ::Actor const& by,
187 ::BlockPos const& pos,
188 uchar face,
189 ::Vec3 const& clickPos,
190 int itemValue
191 ) const;
192
193 MCAPI void $entityInside(::BlockSource& region, ::BlockPos const& pos, ::Actor&) const;
194
195 MCAPI bool $isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const;
196
197 MCFOLD bool
198 $shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const;
199
200 MCFOLD bool $isInteractiveBlock() const;
201
202 MCFOLD bool $isSignalSource() const;
203
204 MCFOLD int $getVariant(::Block const& block) const;
205
206 MCFOLD bool $canSpawnOn(::Actor*) const;
207
208 MCFOLD bool $isButtonBlock() const;
209
210 MCFOLD bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
211
212 MCFOLD bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
213
214 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
215
216 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
217 // NOLINTEND
218
219public:
220 // vftables
221 // NOLINTBEGIN
222 MCNAPI static void** $vftable();
223 // NOLINTEND
224};
Definition AABB.h:18
Definition Actor.h:103
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:18
Definition BlockQueuedTickEvent.h:16
Definition BlockLegacy.h:86
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition ButtonBlock.h:26
static MCAPI void ** $vftable()
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition Vec3.h:10
Definition optional_ref.h:10