LeviLamina
Loading...
Searching...
No Matches
DoorBlock.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 BlockActor;
16class BlockPos;
17class BlockSource;
18class Experiments;
21class ItemInstance;
22class Material;
23class Player;
24namespace BlockEvents { class BlockPlaceEvent; }
25namespace BlockEvents { class BlockPlayerInteractEvent; }
26namespace BlockEvents { class BlockQueuedTickEvent; }
27// clang-format on
28
29class DoorBlock : public ::BlockLegacy {
30public:
31 // DoorBlock inner types define
32 enum class DoorType : int {
33 Oak = 0,
34 Spruce = 1,
35 Birch = 2,
36 Jungle = 3,
37 Acacia = 4,
38 Darkoak = 5,
39 Iron = 6,
40 Crimson = 7,
41 BlueNethershroom = 8,
42 Mangrove = 9,
43 Bamboo = 10,
44 Cherry = 11,
45 Copper = 12,
46 ExposedCopper = 13,
47 WeatheredCopper = 14,
48 OxidizedCopper = 15,
49 WaxedCopper = 16,
50 WaxedExposedCopper = 17,
51 WaxedWeatheredCopper = 18,
52 WaxedOxidizedCopper = 19,
53 PaleOak = 20,
54 Count = 21,
55 };
56
57public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<4, 4, ::DoorBlock::DoorType> mType;
61 // NOLINTEND
62
63public:
64 // prevent constructor by default
65 DoorBlock();
66
67public:
68 // virtual functions
69 // NOLINTBEGIN
70 // vIndex: 117
71 virtual int getVariant(::Block const& block) const /*override*/;
72
73 // vIndex: 2
74 virtual ::Block const* getNextBlockPermutation(::Block const& currentBlock) const /*override*/;
75
76 // vIndex: 10
77 virtual ::AABB const& getVisualShapeInWorld(
78 ::Block const&,
79 ::IConstBlockSource const& region,
80 ::BlockPos const& pos,
81 ::AABB& bufferAABB
82 ) const /*override*/;
83
84 // vIndex: 5
85 virtual ::AABB getCollisionShape(
86 ::Block const& block,
87 ::IConstBlockSource const& region,
88 ::BlockPos const& pos,
90 ) const /*override*/;
91
92 // vIndex: 9
93 virtual ::AABB const& getOutline(
94 ::Block const& block,
95 ::IConstBlockSource const& region,
96 ::BlockPos const& pos,
97 ::AABB& bufferValue
98 ) const /*override*/;
99
100 // vIndex: 13
101 virtual bool
102 getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const
103 /*override*/;
104
105 // vIndex: 86
106 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
107 /*override*/;
108
109 // vIndex: 89
110 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
111
112 // vIndex: 87
113 virtual bool getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const
114 /*override*/;
115
116 // vIndex: 138
117 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
118
119 // vIndex: 88
120 virtual ::Block const* playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const
121 /*override*/;
122
123 // vIndex: 78
124 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
125
126 // vIndex: 66
127 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
128
129 // vIndex: 60
130 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
131 /*override*/;
132
133 // vIndex: 136
134 virtual bool isInteractiveBlock() const /*override*/;
135
136 // vIndex: 56
137 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
138 /*override*/;
139
140 // vIndex: 50
141 virtual void onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
142
143 // vIndex: 48
144 virtual bool canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
145
146 // vIndex: 37
147 virtual bool isDoorBlock() const /*override*/;
148
149 // vIndex: 130
150 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
151
152 // vIndex: 147
153 virtual void _useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
154
155 // vIndex: 145
156 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
157
158 // vIndex: 0
159 virtual ~DoorBlock() /*override*/;
160 // NOLINTEND
161
162public:
163 // member functions
164 // NOLINTBEGIN
165 MCAPI DoorBlock(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
166
167 MCAPI ::Direction::Type getBlockedDirection(::IConstBlockSource const& region, ::BlockPos const& pos) const;
168
169 MCAPI bool isToggled(::IConstBlockSource const& region, ::BlockPos const& pos) const;
170
171 MCFOLD void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
172
173 MCAPI void setToggled(::BlockSource& region, ::BlockPos const& pos, ::Actor* sourceActor, bool toggled) const;
174
175 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
176
177 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
178 // NOLINTEND
179
180public:
181 // static functions
182 // NOLINTBEGIN
183 MCAPI static void getDoorBlocks(
184 ::IConstBlockSource const& region,
185 ::BlockLegacy const& expectedDoorBlockLegacy,
186 ::BlockPos const& pos,
187 ::Block const*& outLowerBlock,
188 ::Block const*& outUpperBlock
189 );
190 // NOLINTEND
191
192public:
193 // constructor thunks
194 // NOLINTBEGIN
195 MCAPI void* $ctor(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
196 // NOLINTEND
197
198public:
199 // destructor thunk
200 // NOLINTBEGIN
201 MCFOLD void $dtor();
202 // NOLINTEND
203
204public:
205 // virtual function thunks
206 // NOLINTBEGIN
207 MCAPI int $getVariant(::Block const& block) const;
208
209 MCFOLD ::Block const* $getNextBlockPermutation(::Block const& currentBlock) const;
210
211 MCAPI ::AABB const& $getVisualShapeInWorld(
212 ::Block const&,
213 ::IConstBlockSource const& region,
214 ::BlockPos const& pos,
215 ::AABB& bufferAABB
216 ) const;
217
218 MCAPI ::AABB $getCollisionShape(
219 ::Block const& block,
220 ::IConstBlockSource const& region,
221 ::BlockPos const& pos,
223 ) const;
224
225 MCFOLD ::AABB const& $getOutline(
226 ::Block const& block,
227 ::IConstBlockSource const& region,
228 ::BlockPos const& pos,
229 ::AABB& bufferValue
230 ) const;
231
232 MCAPI bool
233 $getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const;
234
235 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
236
237 MCAPI ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
238
239 MCFOLD bool $getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const;
240
241 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
242
243 MCAPI ::Block const* $playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const;
244
245 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
246
247 MCAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
248
249 MCAPI void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
250
251 MCFOLD bool $isInteractiveBlock() const;
252
253 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
254
255 MCAPI void $onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
256
257 MCAPI bool $canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
258
259 MCFOLD bool $isDoorBlock() const;
260
261 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
262
263 MCAPI void $_useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
264
265 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
266 // NOLINTEND
267
268public:
269 // vftables
270 // NOLINTBEGIN
271 MCNAPI static void** $vftable();
272 // NOLINTEND
273};
Definition AABB.h:18
Definition Actor.h:103
Definition BlockActor.h:32
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:17
Definition BlockQueuedTickEvent.h:16
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition DoorBlock.h:29
static MCAPI void ** $vftable()
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition ItemInstance.h:16
Definition Material.h:8
Definition Player.h:119
Definition optional_ref.h:10