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