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