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