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