LeviLamina
Loading...
Searching...
No Matches
MultifaceBlock.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/BlockType.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
17class Experiments;
19class HitResult;
22class Material;
24class Vec3;
25namespace BlockEvents { class BlockQueuedTickEvent; }
26// clang-format on
27
28class MultifaceBlock : public ::BlockType {
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::MultifaceSpreader const>> mSpreader;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 MultifaceBlock();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~MultifaceBlock() /*override*/ = default;
43
44 virtual ::AABB const&
45 getVisualShapeInWorld(::Block const& block, ::IConstBlockSource const&, ::BlockPos const&, ::AABB& bufferAABB) const
46 /*override*/;
47
48 virtual ::AABB getCollisionShape(
49 ::Block const&,
51 ::BlockPos const&,
53 ) const /*override*/;
54
55 virtual ::AABB const& getOutline(
56 ::Block const& block,
57 ::IConstBlockSource const& region,
58 ::BlockPos const& pos,
59 ::AABB& bufferValue
60 ) const /*override*/;
61
62 virtual ::HitResult clip(
63 ::Block const& block,
64 ::BlockSource const& region,
65 ::BlockPos const& pos,
66 ::Vec3 const& A,
67 ::Vec3 const& B,
68 ::ShapeType shapeType,
70 ) const /*override*/;
71
72 virtual ::Block const&
73 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
74 /*override*/;
75
76 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
77 /*override*/;
78
79 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
80
81 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
82
83 virtual bool isMultifaceBlock() const /*override*/;
84
85 virtual bool isLavaBlocking() const /*override*/;
86
87 virtual ::Block const& sanitizeFillBlock(::Block const& block) const /*override*/;
88
89 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
90 // NOLINTEND
91
92public:
93 // member functions
94 // NOLINTBEGIN
95 MCAPI MultifaceBlock(
96 ::std::string const& nameId,
97 int id,
98 ::Material const& material,
99 ::std::unique_ptr<::MultifaceSpreader const> spreader
100 );
101
102 MCAPI bool
103 _canSpread(::IBlockWorldGenAPI& target, ::Block const& block, ::BlockPos const& pos, uchar startingFace) const;
104
105 MCAPI void _removeBlock(
106 ::IBlockWorldGenAPI& target,
107 ::BlockSource* region,
108 ::BlockPos const& pos,
109 bool canSpawnParticles
110 ) const;
111
112 MCAPI void removeFace(
113 ::IBlockWorldGenAPI& target,
114 ::BlockSource* region,
115 ::Block const& block,
116 ::BlockPos const& pos,
117 uchar faceDirection,
118 bool canSpawnParticles
119 ) const;
120
121 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
122 // NOLINTEND
123
124public:
125 // static functions
126 // NOLINTBEGIN
127 MCAPI static ::Block const& getBlockForPlacement(
128 ::Block const& oldBlock,
129 ::Block const& placementBlock,
130 ::BlockSource& region,
131 ::BlockPos const& placementPos,
132 uchar placementDirection
133 );
134
135 MCAPI static ::Block const& getBlockForPlacementOrFillMoreFaces(
136 ::Block const& oldBlock,
137 ::Block const& placementBlock,
138 ::BlockSource& region,
139 ::BlockPos const& placementPos,
140 uchar placementDirection
141 );
142
143 MCAPI static ::Block const& getBlockForPlacementWorldGen(
144 ::Block const& oldBlock,
145 ::Block const& placementBlock,
146 ::IBlockWorldGenAPI& region,
147 ::BlockPos const& placementPos,
148 uchar placementDirection
149 );
150
151 MCAPI_C static ::std::vector<uchar> getFacingListFromMask(uchar faceDirectionBits);
152
153 MCAPI static bool hasFace(::Block const& block, uchar faceDirection);
154 // NOLINTEND
155
156public:
157 // static variables
158 // NOLINTBEGIN
159 MCAPI static int const& MULTIFACE_ALL();
160
161 MCAPI static int const& MULTIFACE_DOWN();
162
163 MCAPI static int const& MULTIFACE_EAST();
164
165 MCAPI static int const& MULTIFACE_NORTH();
166
167 MCAPI static int const& MULTIFACE_SIDES();
168
169 MCAPI static int const& MULTIFACE_SOUTH();
170
171 MCAPI static int const& MULTIFACE_UP();
172
173 MCAPI static int const& MULTIFACE_WEST();
174 // NOLINTEND
175
176public:
177 // constructor thunks
178 // NOLINTBEGIN
179 MCAPI void* $ctor(
180 ::std::string const& nameId,
181 int id,
182 ::Material const& material,
183 ::std::unique_ptr<::MultifaceSpreader const> spreader
184 );
185 // NOLINTEND
186
187public:
188 // virtual function thunks
189 // NOLINTBEGIN
190 MCAPI ::AABB const& $getVisualShapeInWorld(
191 ::Block const& block,
192 ::IConstBlockSource const&,
193 ::BlockPos const&,
194 ::AABB& bufferAABB
195 ) const;
196
197 MCFOLD ::AABB $getCollisionShape(
198 ::Block const&,
199 ::IConstBlockSource const&,
200 ::BlockPos const&,
202 ) const;
203
204 MCFOLD ::AABB const& $getOutline(
205 ::Block const& block,
206 ::IConstBlockSource const& region,
207 ::BlockPos const& pos,
208 ::AABB& bufferValue
209 ) const;
210
211 MCAPI ::HitResult $clip(
212 ::Block const& block,
213 ::BlockSource const& region,
214 ::BlockPos const& pos,
215 ::Vec3 const& A,
216 ::Vec3 const& B,
217 ::ShapeType shapeType,
219 ) const;
220
221 MCAPI ::Block const& $getPlacementBlock(
222 ::Actor const& by,
223 ::BlockPos const& pos,
224 uchar face,
225 ::Vec3 const& clickPos,
226 int itemValue
227 ) const;
228
229 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
230
231 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
232
233 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
234
235 MCFOLD bool $isMultifaceBlock() const;
236
237 MCFOLD bool $isLavaBlocking() const;
238
239 MCAPI ::Block const& $sanitizeFillBlock(::Block const& block) const;
240
241 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
242
243
244 // NOLINTEND
245
246public:
247 // vftables
248 // NOLINTBEGIN
249 MCNAPI static void** $vftable();
250 // NOLINTEND
251};
Definition AABB.h:18
Definition Actor.h:105
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:17
Definition IBlockWorldGenAPI.h:25
Definition IConstBlockSource.h:25
Definition Material.h:8
static MCAPI void ** $vftable()
Definition MultifaceSpreader.h:13
Definition Vec3.h:10
Definition optional_ref.h:10