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