LeviLamina
Loading...
Searching...
No Matches
StructurePiece.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Direction.h"
7#include "mc/world/level/levelgen/structure/BoundingBox.h"
8#include "mc/world/level/levelgen/structure/StructurePieceType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Block;
13class BlockPos;
14class BlockSelector;
15class BlockSource;
16class LevelChunk;
17class PieceWeight;
18class Random;
19// clang-format on
20
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<4, 24, ::BoundingBox> mBoundingBox;
26 ::ll::TypedStorage<4, 4, int> mOrientation;
27 ::ll::TypedStorage<4, 4, int> mGenDepth;
28 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mTerrainAdjustmentToken;
29 // NOLINTEND
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ~StructurePiece();
35
36 virtual void moveBoundingBox(int dx, int dy, int dz);
37
38 virtual ::StructurePieceType getType() const;
39
40 virtual void addChildren(
41 ::StructurePiece& startPiece,
42 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
43 ::Random& random
44 );
45
46 virtual bool postProcess(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB) = 0;
47
48 virtual void postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
49
50 virtual bool isInInvalidLocation(::BlockSource& region, ::BoundingBox const& chunkBB);
51
52 virtual int getWorldX(int x, int z);
53
54 virtual int getWorldZ(int x, int z);
55
56 virtual void
57 placeBlock(::BlockSource& region, ::Block const& block, int x, int y, int z, ::BoundingBox const& chunkBB);
58
59 virtual bool
60 canBeReplaced(::BlockSource& region, int const x, int const y, int const z, ::BoundingBox const& chunkBB);
61
62 virtual void generateBox(
63 ::BlockSource& region,
64 ::BoundingBox const& chunkBB,
65 int x0,
66 int y0,
67 int z0,
68 int x1,
69 int y1,
70 int z1,
71 ::Block const& edgeBlock,
72 ::Block const& fillBlock,
73 bool skipAir
74 );
75
76 virtual void addHardcodedSpawnAreas(::LevelChunk& chunk) const;
77 // NOLINTEND
78
79public:
80 // member functions
81 // NOLINTBEGIN
82 MCAPI ::BlockPos _getWorldPos(int x, int y, int z);
83
84 MCAPI void addTerrainAdjustmentToken(::std::shared_ptr<bool> token);
85
86 MCAPI void
87 generateAirBox(::BlockSource& region, ::BoundingBox const& chunkBB, int x0, int y0, int z0, int x1, int y1, int z1);
88
89 MCAPI void generateBox(
90 ::BlockSource& region,
91 ::BoundingBox const& chunkBB,
92 int x0,
93 int y0,
94 int z0,
95 int x1,
96 int y1,
97 int z1,
98 bool skipAir,
99 ::Random& random,
100 ::BlockSelector const& selector
101 );
102
103 MCAPI void generateMaybeBox(
104 ::BlockSource& region,
105 ::BoundingBox const& chunkBB,
106 ::Random& random,
107 float probability,
108 int x0,
109 int y0,
110 int z0,
111 int x1,
112 int y1,
113 int z1,
114 ::Block const& edgeBlock,
115 ::Block const& fillBlock,
116 bool skipAir,
117 bool excludeSky
118 );
119
120 MCAPI void generateUpperHalfSphere(
121 ::BlockSource& region,
122 ::BoundingBox const& chunkBB,
123 int x0,
124 int y0,
125 int z0,
126 int x1,
127 int y1,
128 int z1,
129 ::Block const& fillBlock,
130 bool skipAir
131 );
132
133 MCAPI ::Block const& getBlock(::BlockSource& region, int x, int y, int z, ::BoundingBox const& chunkBB);
134
135 MCFOLD ::Direction::Type getOrientation() const;
136
137 MCAPI ushort getOrientationData(::Block const* block, ushort data);
138
139 MCAPI int getWorldY(int y);
140
141 MCAPI bool isAboveGround(int x0, int y1, int z, ::BlockSource& region);
142
143 MCAPI bool isAir(::BlockSource& region, int x, int y, int z, ::BoundingBox const& chunkBB);
144
145 MCAPI bool isReplaceableBlock(::Block const& block);
146
147 MCAPI void maybeGenerateBlock(
148 ::BlockSource& region,
149 ::BoundingBox const& chunkBB,
150 ::Random& random,
151 float probability,
152 int x,
153 int y,
154 int z,
155 ::Block const& block
156 );
157
158 MCAPI void maybeGenerateBlockIfNotFloating(
159 ::BlockSource& region,
160 ::BoundingBox const& chunkBB,
161 ::Random& random,
162 float probability,
163 int x,
164 int y,
165 int z,
166 ::Block const& block
167 );
168 // NOLINTEND
169
170public:
171 // static functions
172 // NOLINTBEGIN
173 MCAPI static ::StructurePiece*
174 findCollisionPiece(::std::vector<::std::unique_ptr<::StructurePiece>> const& pieces, ::BoundingBox const& box);
175
176 MCAPI static int getTotalWeight(::std::vector<::PieceWeight> const& pieceWeights);
177 // NOLINTEND
178
179public:
180 // destructor thunk
181 // NOLINTBEGIN
182 MCAPI void $dtor();
183 // NOLINTEND
184
185public:
186 // virtual function thunks
187 // NOLINTBEGIN
188 MCAPI void $moveBoundingBox(int dx, int dy, int dz);
189
190 MCFOLD ::StructurePieceType $getType() const;
191
192 MCFOLD void $addChildren(
193 ::StructurePiece& startPiece,
194 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
195 ::Random& random
196 );
197
198 MCFOLD void $postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
199
200 MCAPI bool $isInInvalidLocation(::BlockSource& region, ::BoundingBox const& chunkBB);
201
202 MCAPI int $getWorldX(int x, int z);
203
204 MCAPI int $getWorldZ(int x, int z);
205
206 MCAPI void
207 $placeBlock(::BlockSource& region, ::Block const& block, int x, int y, int z, ::BoundingBox const& chunkBB);
208
209 MCFOLD bool
210 $canBeReplaced(::BlockSource& region, int const x, int const y, int const z, ::BoundingBox const& chunkBB);
211
212 MCAPI void $generateBox(
213 ::BlockSource& region,
214 ::BoundingBox const& chunkBB,
215 int x0,
216 int y0,
217 int z0,
218 int x1,
219 int y1,
220 int z1,
221 ::Block const& edgeBlock,
222 ::Block const& fillBlock,
223 bool skipAir
224 );
225
226 MCFOLD void $addHardcodedSpawnAreas(::LevelChunk& chunk) const;
227
228
229 // NOLINTEND
230
231public:
232 // vftables
233 // NOLINTBEGIN
234 MCNAPI static void** $vftable();
235 // NOLINTEND
236};
Definition BlockPos.h:21
Definition BlockSelector.h:11
Definition BlockSource.h:73
Definition Block.h:69
Definition BoundingBox.h:13
Definition LevelChunk.h:87
Definition PieceWeight.h:5
Definition Random.h:10
Definition StructurePiece.h:21
static MCAPI void ** $vftable()