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
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: 92
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: 87
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: 80
90 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
91
92 // vIndex: 43
93 virtual bool isMultifaceBlock() const /*override*/;
94
95 // vIndex: 30
96 virtual bool isLavaBlocking() const /*override*/;
97
98 // vIndex: 50
99 virtual ::Block const& sanitizeFillBlock(::Block const& block) const /*override*/;
100
101 // vIndex: 131
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 ::Block const& getBlockForPlacement(
141 ::Block const& oldBlock,
142 ::Block const& placementBlock,
143 ::BlockSource& region,
144 ::BlockPos const& placementPos,
145 uchar placementDirection
146 );
147
148 MCAPI static ::Block const& getBlockForPlacementOrFillMoreFaces(
149 ::Block const& oldBlock,
150 ::Block const& placementBlock,
151 ::BlockSource& region,
152 ::BlockPos const& placementPos,
153 uchar placementDirection
154 );
155
156 MCAPI static ::Block const& getBlockForPlacementWorldGen(
157 ::Block const& oldBlock,
158 ::Block const& placementBlock,
159 ::IBlockWorldGenAPI& region,
160 ::BlockPos const& placementPos,
161 uchar placementDirection
162 );
163
164 MCAPI static bool hasFace(::Block const& block, uchar faceDirection);
165 // NOLINTEND
166
167public:
168 // static variables
169 // NOLINTBEGIN
170 MCAPI static int const& MULTIFACE_ALL();
171
172 MCAPI static int const& MULTIFACE_DOWN();
173
174 MCAPI static int const& MULTIFACE_EAST();
175
176 MCAPI static int const& MULTIFACE_NORTH();
177
178 MCAPI static int const& MULTIFACE_SIDES();
179
180 MCAPI static int const& MULTIFACE_SOUTH();
181
182 MCAPI static int const& MULTIFACE_UP();
183
184 MCAPI static int const& MULTIFACE_WEST();
185 // NOLINTEND
186
187public:
188 // constructor thunks
189 // NOLINTBEGIN
190 MCAPI void* $ctor(
191 ::std::string const& nameId,
192 int id,
193 ::Material const& material,
194 ::std::unique_ptr<::MultifaceSpreader const> spreader
195 );
196 // NOLINTEND
197
198public:
199 // virtual function thunks
200 // NOLINTBEGIN
201 MCAPI ::AABB const& $getVisualShapeInWorld(
202 ::Block const& block,
203 ::IConstBlockSource const&,
204 ::BlockPos const&,
205 ::AABB& bufferAABB
206 ) const;
207
208 MCFOLD ::AABB $getCollisionShape(
209 ::Block const&,
210 ::IConstBlockSource const&,
211 ::BlockPos const&,
213 ) const;
214
215 MCFOLD ::AABB const& $getOutline(
216 ::Block const& block,
217 ::IConstBlockSource const& region,
218 ::BlockPos const& pos,
219 ::AABB& bufferValue
220 ) const;
221
222 MCAPI ::HitResult $clip(
223 ::Block const& block,
224 ::BlockSource const& region,
225 ::BlockPos const& pos,
226 ::Vec3 const& A,
227 ::Vec3 const& B,
228 ::ShapeType shapeType,
230 ) const;
231
232 MCAPI ::Block const& $getPlacementBlock(
233 ::Actor const& by,
234 ::BlockPos const& pos,
235 uchar face,
236 ::Vec3 const& clickPos,
237 int itemValue
238 ) const;
239
240 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
241
242 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
243
244 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
245
246 MCFOLD bool $isMultifaceBlock() const;
247
248 MCFOLD bool $isLavaBlocking() const;
249
250 MCAPI ::Block const& $sanitizeFillBlock(::Block const& block) const;
251
252 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
253 // NOLINTEND
254
255public:
256 // vftables
257 // NOLINTBEGIN
258 MCNAPI static void** $vftable();
259 // NOLINTEND
260};
Definition AABB.h:18
Definition Actor.h:102
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition BlockType.h:84
Definition Block.h:37
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:17
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