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