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