LeviLamina
Loading...
Searching...
No Matches
StairBlock.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/level/ShapeType.h"
8#include "mc/world/level/block/BlockDescriptor.h"
9#include "mc/world/level/block/BlockType.h"
10
11// auto generated forward declare list
12// clang-format off
13class AABB;
14class Actor;
15class BaseGameVersion;
16class Block;
17class BlockPos;
18class BlockSource;
19class EntityContext;
20class Experiments;
22class HitResult;
24class Player;
25class Vec3;
27// clang-format on
28
29class StairBlock : public ::BlockType {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 8, ::BlockType const&> mBase;
34 ::ll::TypedStorage<8, 192, ::std::optional<::BlockDescriptor> const> mBlocksToCornerWith;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 StairBlock& operator=(StairBlock const&);
40 StairBlock(StairBlock const&);
41 StairBlock();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual ::HitResult clip(
47 ::Block const& block,
48 ::BlockSource const& region,
49 ::BlockPos const& pos,
50 ::Vec3 const& A,
51 ::Vec3 const& B,
52 ::ShapeType shapeType,
54 ) const /*override*/;
55
56 virtual ::AABB const&
57 getOutline(::Block const&, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const
58 /*override*/;
59
60 virtual void addAABBs(
61 ::Block const& block,
62 ::IConstBlockSource const& region,
63 ::BlockPos const& pos,
64 ::AABB const* intersectTestBox,
65 ::std::vector<::AABB>& inoutBoxes
66 ) const /*override*/;
67
68 virtual bool addCollisionShapes(
69 ::Block const& block,
70 ::IConstBlockSource const& region,
71 ::BlockPos const& pos,
72 ::AABB const* intersectTestBox,
73 ::std::vector<::AABB>& inoutBoxes,
75 ) const /*override*/;
76
77 virtual bool
78 getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const
79 /*override*/;
80
81 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
82
83 virtual void animateTick(::BlockAnimateTickData const& tickData) const /*override*/;
84
85 virtual bool attack(::Player* player, ::BlockPos const& pos) const /*override*/;
86
87 virtual void
88 destroy(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, ::Actor* entitySource) const
89 /*override*/;
90
91 virtual bool mayPick() const /*override*/;
92
93 virtual bool mayPick(::BlockSource const& region, ::Block const& block, bool liquid) const /*override*/;
94
95 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
96
97 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
98
99 virtual void onStandOn(::EntityContext& entity, ::BlockPos const& pos) const /*override*/;
100
101 virtual void onExploded(::BlockSource& region, ::BlockPos const& pos, ::Actor* entitySource) const /*override*/;
102
103 virtual ::Block const&
104 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
105 /*override*/;
106
107 virtual bool isStairBlock() const /*override*/;
108
109 virtual int getVariant(::Block const& block) const /*override*/;
110
111 virtual bool liquidCanFlowIntoFromDirection(
112 uchar flowIntoFacing,
113 ::std::function<::Block const&(::BlockPos const&)> const& getBlock,
114 ::BlockPos const& pos
115 ) const /*override*/;
116
117 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
118
119 virtual void _addHardCodedBlockComponents(::Experiments const& experiments) /*override*/;
120
121 virtual ~StairBlock() /*override*/;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
127 MCAPI StairBlock(::std::string const& nameId, int id, ::BlockType const& base, bool enableCornerStairTag);
128
129 MCAPI bool setInnerPieceShape(
130 ::Block const& block,
131 ::IConstBlockSource const& region,
132 ::BlockPos const& pos,
133 ::AABB& shape,
134 bool shrink
135 ) const;
136
137 MCAPI bool setStepShape(
138 ::Block const& block,
139 ::IConstBlockSource const& region,
140 ::BlockPos const& pos,
141 ::AABB& shape,
142 bool shrink
143 ) const;
144
145 MCAPI_C void shapeZFightShrink(::AABB& shape) const;
146 // NOLINTEND
147
148public:
149 // static variables
150 // NOLINTBEGIN
151 MCAPI static ::std::add_lvalue_reference_t<int[][2]> DEAD_SPACES();
152 // NOLINTEND
153
154public:
155 // constructor thunks
156 // NOLINTBEGIN
157 MCAPI void* $ctor(::std::string const& nameId, int id, ::BlockType const& base, bool enableCornerStairTag);
158 // NOLINTEND
159
160public:
161 // destructor thunk
162 // NOLINTBEGIN
163 MCAPI void $dtor();
164 // NOLINTEND
165
166public:
167 // virtual function thunks
168 // NOLINTBEGIN
169#ifdef LL_PLAT_S
170 MCAPI ::HitResult $clip(
171 ::Block const& block,
172 ::BlockSource const& region,
173 ::BlockPos const& pos,
174 ::Vec3 const& A,
175 ::Vec3 const& B,
176 ::ShapeType shapeType,
178 ) const;
179#endif
180
181 MCFOLD ::AABB const&
182 $getOutline(::Block const&, ::IConstBlockSource const&, ::BlockPos const& pos, ::AABB& bufferValue) const;
183
184 MCAPI void $addAABBs(
185 ::Block const& block,
186 ::IConstBlockSource const& region,
187 ::BlockPos const& pos,
188 ::AABB const* intersectTestBox,
189 ::std::vector<::AABB>& inoutBoxes
190 ) const;
191
192 MCFOLD bool $addCollisionShapes(
193 ::Block const& block,
194 ::IConstBlockSource const& region,
195 ::BlockPos const& pos,
196 ::AABB const* intersectTestBox,
197 ::std::vector<::AABB>& inoutBoxes,
199 ) const;
200
201 MCAPI bool
202 $getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const;
203
204 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
205
206 MCAPI void $animateTick(::BlockAnimateTickData const& tickData) const;
207
208 MCAPI bool $attack(::Player* player, ::BlockPos const& pos) const;
209
210 MCAPI void
211 $destroy(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, ::Actor* entitySource) const;
212
213 MCAPI bool $mayPick() const;
214
215 MCAPI bool $mayPick(::BlockSource const& region, ::Block const& block, bool liquid) const;
216
217 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
218
219 MCAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
220
221 MCAPI void $onStandOn(::EntityContext& entity, ::BlockPos const& pos) const;
222
223 MCAPI void $onExploded(::BlockSource& region, ::BlockPos const& pos, ::Actor* entitySource) const;
224
225 MCAPI ::Block const& $getPlacementBlock(
226 ::Actor const& by,
227 ::BlockPos const& pos,
228 uchar face,
229 ::Vec3 const& clickPos,
230 int itemValue
231 ) const;
232
233 MCFOLD bool $isStairBlock() const;
234
235 MCFOLD int $getVariant(::Block const& block) const;
236
237 MCAPI bool $liquidCanFlowIntoFromDirection(
238 uchar flowIntoFacing,
239 ::std::function<::Block const&(::BlockPos const&)> const& getBlock,
240 ::BlockPos const& pos
241 ) const;
242
243 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
244
245 MCAPI void $_addHardCodedBlockComponents(::Experiments const& experiments);
246
247
248 // NOLINTEND
249
250public:
251 // vftables
252 // NOLINTBEGIN
253 MCNAPI static void** $vftable();
254 // NOLINTEND
255};
Definition AABB.h:18
Definition Actor.h:105
Definition BaseGameVersion.h:8
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition EntityContext.h:16
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:17
Definition IConstBlockSource.h:25
Definition Player.h:125
static MCAPI void ** $vftable()
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14