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 // virtual functions
65 // NOLINTBEGIN
66 // vIndex: 118
67 virtual int getVariant(::Block const& block) const /*override*/;
68
69 // vIndex: 2
70 virtual ::Block const* getNextBlockPermutation(::Block const& currentBlock) const /*override*/;
71
72 // vIndex: 10
73 virtual ::AABB const&
74 getVisualShapeInWorld(::Block const&, ::IConstBlockSource const& region, ::BlockPos const& pos, ::AABB& bufferAABB)
75 const /*override*/;
76
77 // vIndex: 5
78 virtual ::AABB
79 getCollisionShape(::Block const& block, ::IConstBlockSource const& region, ::BlockPos const& pos, ::optional_ref<::GetCollisionShapeInterface const>)
80 const /*override*/;
81
82 // vIndex: 9
83 virtual ::AABB const&
84 getOutline(::Block const& block, ::IConstBlockSource const& region, ::BlockPos const& pos, ::AABB& bufferValue)
85 const /*override*/;
86
87 // vIndex: 13
88 virtual bool
89 getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const
90 /*override*/;
91
92 // vIndex: 87
93 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
94 /*override*/;
95
96 // vIndex: 90
97 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
98
99 // vIndex: 88
100 virtual bool getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const
101 /*override*/;
102
103 // vIndex: 142
104 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
105
106 // vIndex: 89
107 virtual ::Block const* playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const
108 /*override*/;
109
110 // vIndex: 79
111 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
112
113 // vIndex: 67
114 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
115
116 // vIndex: 61
117 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
118 /*override*/;
119
120 // vIndex: 138
121 virtual bool isInteractiveBlock() const /*override*/;
122
123 // vIndex: 57
124 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
125 /*override*/;
126
127 // vIndex: 51
128 virtual void onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
129
130 // vIndex: 49
131 virtual bool canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
132
133 // vIndex: 38
134 virtual bool isDoorBlock() const /*override*/;
135
136 // vIndex: 131
137 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
138
139 // vIndex: 150
140 virtual void _useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
141
142 // vIndex: 148
143 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
144
145 // vIndex: 0
146 virtual ~DoorBlock() /*override*/;
147 // NOLINTEND
148
149public:
150 // member functions
151 // NOLINTBEGIN
152 MCAPI DoorBlock(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
153
154 MCAPI ::Direction::Type getBlockedDirection(::IConstBlockSource const& region, ::BlockPos const& pos) const;
155
156 MCAPI bool isToggled(::IConstBlockSource const& region, ::BlockPos const& pos) const;
157
158 MCFOLD void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
159
160 MCAPI void setToggled(::BlockSource& region, ::BlockPos const& pos, ::Actor* sourceActor, bool toggled) const;
161
162 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
163
164 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
165 // NOLINTEND
166
167public:
168 // static functions
169 // NOLINTBEGIN
170 MCAPI static void getDoorBlocks(
171 ::IConstBlockSource const& region,
172 ::BlockLegacy const& expectedDoorBlockLegacy,
173 ::BlockPos const& pos,
174 ::Block const*& outLowerBlock,
175 ::Block const*& outUpperBlock
176 );
177 // NOLINTEND
178
179public:
180 // constructor thunks
181 // NOLINTBEGIN
182 MCAPI void* $ctor(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
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&
199 $getVisualShapeInWorld(::Block const&, ::IConstBlockSource const& region, ::BlockPos const& pos, ::AABB& bufferAABB)
200 const;
201
202 MCAPI ::AABB
203 $getCollisionShape(::Block const& block, ::IConstBlockSource const& region, ::BlockPos const& pos, ::optional_ref<::GetCollisionShapeInterface const>)
204 const;
205
206 MCFOLD ::AABB const&
207 $getOutline(::Block const& block, ::IConstBlockSource const& region, ::BlockPos const& pos, ::AABB& bufferValue)
208 const;
209
210 MCAPI bool
211 $getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const;
212
213 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
214
215 MCAPI ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
216
217 MCFOLD bool $getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const;
218
219 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
220
221 MCAPI ::Block const* $playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const;
222
223 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
224
225 MCAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
226
227 MCAPI void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
228
229 MCFOLD bool $isInteractiveBlock() const;
230
231 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
232
233 MCAPI void $onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
234
235 MCAPI bool $canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
236
237 MCFOLD bool $isDoorBlock() const;
238
239 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
240
241 MCAPI void $_useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
242
243 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
244 // NOLINTEND
245
246public:
247 // vftables
248 // NOLINTBEGIN
249 MCAPI static void** $vftable();
250 // NOLINTEND
251};
Definition AABB.h:16
Definition Actor.h:104
Definition BlockActor.h:32
Definition BlockPlaceEvent.h:15
Definition BlockPlayerInteractEvent.h:15
Definition BlockQueuedTickEvent.h:15
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition DoorBlock.h:29
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