LeviLamina
Loading...
Searching...
No Matches
WoodlandMansionPieces.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/util/Mirror.h"
8#include "mc/util/Rotation.h"
9#include "mc/world/level/BlockPos.h"
10#include "mc/world/level/levelgen/structure/StructurePieceType.h"
11#include "mc/world/level/levelgen/structure/TemplateStructurePiece.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockSource;
16class BoundingBox;
17class Random;
19class StructurePiece;
20// clang-format on
21
23public:
24 // WoodlandMansionPieces inner types declare
25 // clang-format off
27 struct PlacementData;
28 class SimpleGrid;
31 class MansionGrid;
35 // clang-format on
36
37 // WoodlandMansionPieces inner types define
39 public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~FloorRoomCollection() = default;
43
44 virtual ::std::string get1x1(::Random& random) = 0;
45
46 virtual ::std::string get1x1Secret(::Random& random) = 0;
47
48 virtual ::std::string get1x2SideEntrance(::Random& random, bool isStairsRoom) = 0;
49
50 virtual ::std::string get1x2FrontEntrance(::Random& random, bool isStairsRoom) = 0;
51
52 virtual ::std::string get1x2Secret(::Random& random) = 0;
53
54 virtual ::std::string get2x2(::Random& random) = 0;
55
56 virtual ::std::string get2x2Secret(::Random&) = 0;
57 // NOLINTEND
58
59 public:
60 // virtual function thunks
61 // NOLINTBEGIN
62
63 // NOLINTEND
64 };
65
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<1, 1, ::Rotation> mRotation;
71 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
72 ::ll::TypedStorage<8, 32, ::std::string> mWallType;
73 // NOLINTEND
74 };
75
76 class SimpleGrid {
77 public:
78 // member variables
79 // NOLINTBEGIN
80 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<int>>> mGrid;
81 ::ll::TypedStorage<4, 4, int> mWidth;
82 ::ll::TypedStorage<4, 4, int> mHeight;
83 ::ll::TypedStorage<4, 4, int> mValueIfOutside;
84 // NOLINTEND
85
86 public:
87 // member functions
88 // NOLINTBEGIN
89 MCAPI bool edgesTo(int x, int y, int ifValue);
90 // NOLINTEND
91 };
92
93 class WoodlandMansionPiece : public ::TemplateStructurePiece {
94 public:
95 // member variables
96 // NOLINTBEGIN
97 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mStructureManager;
98 ::ll::TypedStorage<8, 32, ::std::string> mTemplateName;
99 ::ll::TypedStorage<1, 1, ::Rotation> mRotation;
100 ::ll::TypedStorage<1, 1, ::Mirror> mMirror;
101 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
102 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mVindicatorPositions;
103 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mEvokerPositions;
104 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mAllayGroupPositions;
105 // NOLINTEND
106
107 public:
108 // prevent constructor by default
109 WoodlandMansionPiece();
110
111 public:
112 // virtual functions
113 // NOLINTBEGIN
114 virtual ::StructurePieceType getType() const /*override*/;
115
116 virtual void postProcessMobsAt(::BlockSource& region, ::Random& chunkBB, ::BoundingBox const&) /*override*/;
117
118 virtual void _handleDataMarker(
119 ::std::string const& markerId,
120 ::BlockPos const& position,
121 ::BlockSource& region,
122 ::Random& random,
123 ::BoundingBox const& chunkBB
124 ) /*override*/;
125 // NOLINTEND
126
127 public:
128 // member functions
129 // NOLINTBEGIN
130 MCAPI WoodlandMansionPiece(
131 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
132 ::std::string const& templateName,
133 ::BlockPos const& origin,
134 ::Rotation rotation
135 );
136
137 MCAPI WoodlandMansionPiece(
138 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
139 ::std::string const& templateName,
140 ::BlockPos const& origin,
141 ::Rotation rotation,
142 ::Mirror mirror
143 );
144
145 MCAPI void _addChest(
146 ::std::string const& markerId,
147 ::BlockPos const& position,
148 ::BlockSource& region,
149 ::Random& random,
150 ::BoundingBox const& chunkBB
151 );
152
153 MCAPI void _loadTemplate();
154 // NOLINTEND
155
156 public:
157 // constructor thunks
158 // NOLINTBEGIN
159 MCAPI void* $ctor(
160 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
161 ::std::string const& templateName,
162 ::BlockPos const& origin,
163 ::Rotation rotation
164 );
165
166 MCAPI void* $ctor(
167 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
168 ::std::string const& templateName,
169 ::BlockPos const& origin,
170 ::Rotation rotation,
171 ::Mirror mirror
172 );
173 // NOLINTEND
174
175 public:
176 // virtual function thunks
177 // NOLINTBEGIN
178 MCAPI ::StructurePieceType $getType() const;
179
180 MCAPI void $postProcessMobsAt(::BlockSource& region, ::Random& chunkBB, ::BoundingBox const&);
181
182 MCAPI void $_handleDataMarker(
183 ::std::string const& markerId,
184 ::BlockPos const& position,
185 ::BlockSource& region,
186 ::Random& random,
187 ::BoundingBox const& chunkBB
188 );
189
190
191 // NOLINTEND
192
193 public:
194 // vftables
195 // NOLINTBEGIN
196 MCNAPI static void** $vftable();
197 // NOLINTEND
198 };
199
201 public:
202 // virtual functions
203 // NOLINTBEGIN
204 virtual ~FirstFloorRoomCollection() /*override*/ = default;
205
206 virtual ::std::string get1x1(::Random& random) /*override*/;
207
208 virtual ::std::string get1x1Secret(::Random& random) /*override*/;
209
210 virtual ::std::string get1x2SideEntrance(::Random& random, bool) /*override*/;
211
212 virtual ::std::string get1x2FrontEntrance(::Random& random, bool) /*override*/;
213
214 virtual ::std::string get1x2Secret(::Random& random) /*override*/;
215
216 virtual ::std::string get2x2(::Random& random) /*override*/;
217
218 virtual ::std::string get2x2Secret(::Random&) /*override*/;
219 // NOLINTEND
220
221 public:
222 // virtual function thunks
223 // NOLINTBEGIN
224 MCAPI ::std::string $get1x1(::Random& random);
225
226 MCFOLD ::std::string $get1x1Secret(::Random& random);
227
228 MCAPI ::std::string $get1x2SideEntrance(::Random& random, bool);
229
230 MCAPI ::std::string $get1x2FrontEntrance(::Random& random, bool);
231
232 MCAPI ::std::string $get1x2Secret(::Random& random);
233
234 MCAPI ::std::string $get2x2(::Random& random);
235
236 MCFOLD ::std::string $get2x2Secret(::Random&);
237
238
239 // NOLINTEND
240
241 public:
242 // vftables
243 // NOLINTBEGIN
244 MCNAPI static void** $vftable();
245 // NOLINTEND
246 };
247
248 class MansionGrid {
249 public:
250 // member variables
251 // NOLINTBEGIN
252 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>> mBaseGrid;
253 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>> mThirdFloorGrid;
254 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>>> mFloorRooms;
255 ::ll::TypedStorage<4, 4, int> mEntranceX;
256 ::ll::TypedStorage<4, 4, int> mEntranceY;
257 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
258 // NOLINTEND
259
260 public:
261 // prevent constructor by default
262 MansionGrid& operator=(MansionGrid const&);
263 MansionGrid(MansionGrid const&);
264 MansionGrid();
265
266 public:
267 // member functions
268 // NOLINTBEGIN
269 MCAPI explicit MansionGrid(::Random& random);
270
271 MCAPI bool _cleanEdges(::WoodlandMansionPieces::SimpleGrid& grid);
272
273 MCAPI void
275
276 MCAPI void
277 _recursiveCorridor(::WoodlandMansionPieces::SimpleGrid& grid, int x, int y, uchar heading, int depth);
278
279 MCAPI void _setupThirdFloor();
280
281 MCAPI uchar
282 get1x2RoomDirection(::WoodlandMansionPieces::SimpleGrid const& x, int y, int floorNum, int roomId, int) const;
283 // NOLINTEND
284
285 public:
286 // constructor thunks
287 // NOLINTBEGIN
288 MCAPI void* $ctor(::Random& random);
289 // NOLINTEND
290 };
291
292 class MansionPiecePlacer {
293 public:
294 // member variables
295 // NOLINTBEGIN
296 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mStructureManager;
297 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
298 ::ll::TypedStorage<4, 4, int> mStartX;
299 ::ll::TypedStorage<4, 4, int> mStartY;
300 // NOLINTEND
301
302 public:
303 // prevent constructor by default
304 MansionPiecePlacer& operator=(MansionPiecePlacer const&);
305 MansionPiecePlacer(MansionPiecePlacer const&);
306 MansionPiecePlacer();
307
308 public:
309 // member functions
310 // NOLINTBEGIN
311 MCAPI void _addRoom1x1(
312 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
313 ::BlockPos const& roomPos,
314 ::Rotation rotation,
315 uchar doorDir,
317 );
318
319 MCAPI void _addRoom1x2(
320 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
321 ::BlockPos const& roomPos,
322 ::Rotation rotation,
323 uchar roomDir,
324 uchar doorDir,
326 bool isStairsRoom
327 );
328
329 MCAPI void _addRoom2x2(
330 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
331 ::BlockPos const& roomPos,
332 ::Rotation rotation,
333 uchar roomDir,
334 uchar doorDir,
336 );
337
338 MCAPI void _addRoom2x2Secret(
339 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
340 ::BlockPos const& roomPos,
341 ::Rotation rotation,
343 );
344
345 MCAPI void _createRoof(
346 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
347 ::BlockPos const& roofOrigin,
348 ::Rotation rotation,
351 );
352
353 MCAPI void _entrance(
354 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
356 );
357
358 MCAPI void _traverseOuterWalls(
359 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
362 uchar gridDirection,
363 int startX,
364 int startY,
365 int endX,
366 int endY
367 );
368
369 MCAPI void _traverseTurn(
370 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
372 );
373
374 MCAPI void _traverseWallPiece(
375 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
377 );
378
379 MCAPI void createMansion(
380 ::BlockPos const& origin,
381 ::Rotation rotation,
382 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
384 );
385 // NOLINTEND
386 };
387
389 public:
390 // virtual functions
391 // NOLINTBEGIN
392 virtual ~SecondFloorRoomCollection() /*override*/ = default;
393
394 virtual ::std::string get1x1(::Random& random) /*override*/;
395
396 virtual ::std::string get1x1Secret(::Random& random) /*override*/;
397
398 virtual ::std::string get1x2SideEntrance(::Random& random, bool isStairsRoom) /*override*/;
399
400 virtual ::std::string get1x2FrontEntrance(::Random& random, bool isStairsRoom) /*override*/;
401
402 virtual ::std::string get1x2Secret(::Random& random) /*override*/;
403
404 virtual ::std::string get2x2(::Random& random) /*override*/;
405
406 virtual ::std::string get2x2Secret(::Random&) /*override*/;
407 // NOLINTEND
408
409 public:
410 // virtual function thunks
411 // NOLINTBEGIN
412 MCAPI ::std::string $get1x1(::Random& random);
413
414 MCFOLD ::std::string $get1x1Secret(::Random& random);
415
416 MCAPI ::std::string $get1x2SideEntrance(::Random& random, bool isStairsRoom);
417
418 MCAPI ::std::string $get1x2FrontEntrance(::Random& random, bool isStairsRoom);
419
420 MCAPI ::std::string $get1x2Secret(::Random& random);
421
422 MCAPI ::std::string $get2x2(::Random& random);
423
424 MCFOLD ::std::string $get2x2Secret(::Random&);
425
426
427 // NOLINTEND
428
429 public:
430 // vftables
431 // NOLINTBEGIN
432 MCNAPI static void** $vftable();
433 // NOLINTEND
434 };
435
437 public:
438 // vftables
439 // NOLINTBEGIN
440 MCNAPI static void** $vftable();
441 // NOLINTEND
442 };
443
445
447
449
450public:
451 // static functions
452 // NOLINTBEGIN
453 MCAPI static void generateMansion(
454 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
455 ::BlockPos const& origin,
456 ::Rotation rotation,
457 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
458 ::Random& random
459 );
460 // NOLINTEND
461};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BoundingBox.h:13
Definition Random.h:10
Definition StructureManager.h:46
Definition StructurePiece.h:21
Definition WoodlandMansionPieces.h:200
Definition WoodlandMansionPieces.h:38
Definition WoodlandMansionPieces.h:248
Definition WoodlandMansionPieces.h:292
Definition WoodlandMansionPieces.h:388
Definition WoodlandMansionPieces.h:76
Definition WoodlandMansionPieces.h:436
Definition WoodlandMansionPieces.h:93
Definition WoodlandMansionPieces.h:22
Definition WoodlandMansionPieces.h:66