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;
20class ItemInstance;
21class Material;
22class Player;
23namespace BlockEvents { class BlockPlayerInteractEvent; }
24namespace BlockEvents { class BlockQueuedTickEvent; }
25namespace BlockEvents { class BlockRedstoneUpdateEvent; }
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 Poplar = 21,
54 Count = 22,
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 virtual int getVariant(::Block const& block) const /*override*/;
71
72 virtual ::Block const* getNextBlockPermutation(::Block const& currentBlock) const /*override*/;
73
74 virtual ::AABB const& getVisualShapeInWorld(
75 ::Block const&,
76 ::IConstBlockSource const& region,
77 ::BlockPos const& pos,
78 ::AABB& bufferAABB
79 ) const /*override*/;
80
81 virtual ::AABB getCollisionShape(
82 ::Block const& block,
83 ::IConstBlockSource const& region,
84 ::BlockPos const& pos,
86 ) const /*override*/;
87
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 virtual bool
96 getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const
97 /*override*/;
98
99 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
100 /*override*/;
101
102 virtual ::ItemInstance asItemInstance(::Block const& block, ::BlockActor const*) const /*override*/;
103
104 virtual bool getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const
105 /*override*/;
106
107 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
108
109 virtual ::Block const* playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const
110 /*override*/;
111
112 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
113
114 virtual bool isInteractiveBlock() const /*override*/;
115
116 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
117 /*override*/;
118
119 virtual void onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
120
121 virtual bool canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& fillBlock) const
122 /*override*/;
123
124 virtual void _useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
125
126 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
127 // NOLINTEND
128
129public:
130 // member functions
131 // NOLINTBEGIN
132 MCAPI DoorBlock(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
133
134 MCAPI void _onRedstoneUpdate(::BlockEvents::BlockRedstoneUpdateEvent& blockEvent) const;
135
136 MCAPI ::Direction::Type getDir(::IConstBlockSource const& region, ::BlockPos const& pos) const;
137
138 MCAPI bool hasRightHinge(::IConstBlockSource const& region, ::BlockPos const& pos) const;
139
140 MCAPI void setToggled(::BlockSource& region, ::BlockPos const& pos, ::Actor* sourceActor, bool toggled) const;
141
142 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
143
144 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
145 // NOLINTEND
146
147public:
148 // static functions
149 // NOLINTBEGIN
150 MCAPI static bool
151 _isDoorToggled(::IConstBlockSource const& region, ::BlockType const& blockType, ::BlockPos const& pos);
152
153 MCAPI static void _onSetupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos);
154
155 MCAPI static void getDoorBlocks(
156 ::IConstBlockSource const& region,
157 ::BlockType const& expectedDoorBlockType,
158 ::BlockPos const& pos,
159 ::Block const*& outLowerBlock,
160 ::Block const*& outUpperBlock
161 );
162 // NOLINTEND
163
164public:
165 // constructor thunks
166 // NOLINTBEGIN
167 MCAPI void* $ctor(::std::string const& nameId, int id, ::Material const& material, ::DoorBlock::DoorType type);
168 // NOLINTEND
169
170public:
171 // virtual function thunks
172 // NOLINTBEGIN
173 MCAPI int $getVariant(::Block const& block) const;
174
175 MCFOLD ::Block const* $getNextBlockPermutation(::Block const& currentBlock) const;
176
177 MCAPI ::AABB const& $getVisualShapeInWorld(
178 ::Block const&,
179 ::IConstBlockSource const& region,
180 ::BlockPos const& pos,
181 ::AABB& bufferAABB
182 ) const;
183
184 MCAPI ::AABB $getCollisionShape(
185 ::Block const& block,
186 ::IConstBlockSource const& region,
187 ::BlockPos const& pos,
189 ) const;
190
191 MCFOLD ::AABB const& $getOutline(
192 ::Block const& block,
193 ::IConstBlockSource const& region,
194 ::BlockPos const& pos,
195 ::AABB& bufferValue
196 ) const;
197
198 MCAPI bool
199 $getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const;
200
201 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
202
203 MCAPI ::ItemInstance $asItemInstance(::Block const& block, ::BlockActor const*) const;
204
205 MCFOLD bool $getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const;
206
207 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
208
209 MCAPI ::Block const* $playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const;
210
211 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
212
213 MCFOLD bool $isInteractiveBlock() const;
214
215 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
216
217 MCAPI void $onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
218
219 MCAPI bool $canFillAtPos(::BlockSource& region, ::BlockPos const& pos, ::Block const& fillBlock) const;
220
221 MCAPI void $_useDoor(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
222
223 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
224
225
226 // NOLINTEND
227
228public:
229 // vftables
230 // NOLINTBEGIN
231 MCAPI static void** $vftable();
232 // NOLINTEND
233};
Definition AABB.h:18
Definition Actor.h:114
Definition BlockActor.h:28
Definition BlockPlayerInteractEvent.h:17
Definition BlockQueuedTickEvent.h:16
Definition BlockRedstoneUpdateEvent.h:15
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Block.h:42
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:25
Definition ItemInstance.h:15
Definition Material.h:8
Definition Player.h:129
Definition optional_ref.h:10