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&) = 0;
45
46 virtual ::std::string get1x1Secret(::Random&) = 0;
47
48 virtual ::std::string get1x2SideEntrance(::Random&, bool) = 0;
49
50 virtual ::std::string get1x2FrontEntrance(::Random&, bool) = 0;
51
52 virtual ::std::string get1x2Secret(::Random&) = 0;
53
54 virtual ::std::string get2x2(::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 public:
66 // vftables
67 // NOLINTBEGIN
68 MCNAPI static void** $vftable();
69 // NOLINTEND
70 };
71
73 public:
74 // member variables
75 // NOLINTBEGIN
76 ::ll::TypedStorage<1, 1, ::Rotation> mRotation;
77 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
78 ::ll::TypedStorage<8, 32, ::std::string> mWallType;
79 // NOLINTEND
80
81 public:
82 // member functions
83 // NOLINTBEGIN
84 MCAPI ~PlacementData();
85 // NOLINTEND
86
87 public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCFOLD void $dtor();
91 // NOLINTEND
92 };
93
94 class SimpleGrid {
95 public:
96 // member variables
97 // NOLINTBEGIN
98 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<int>>> mGrid;
99 ::ll::TypedStorage<4, 4, int> mWidth;
100 ::ll::TypedStorage<4, 4, int> mHeight;
101 ::ll::TypedStorage<4, 4, int> mValueIfOutside;
102 // NOLINTEND
103
104 public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI void set(int x0, int y0, int x1, int y1, int value);
108 // NOLINTEND
109 };
110
111 class WoodlandMansionPiece : public ::TemplateStructurePiece {
112 public:
113 // member variables
114 // NOLINTBEGIN
115 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mStructureManager;
116 ::ll::TypedStorage<8, 32, ::std::string> mTemplateName;
117 ::ll::TypedStorage<1, 1, ::Rotation> mRotation;
118 ::ll::TypedStorage<1, 1, ::Mirror> mMirror;
119 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
120 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mVindicatorPositions;
121 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mEvokerPositions;
122 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mAllayGroupPositions;
123 // NOLINTEND
124
125 public:
126 // prevent constructor by default
127 WoodlandMansionPiece();
128
129 public:
130 // virtual functions
131 // NOLINTBEGIN
132 virtual ::StructurePieceType getType() const /*override*/;
133
134 virtual void
135 postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB) /*override*/;
136
137 virtual void _handleDataMarker(
138 ::std::string const& markerId,
139 ::BlockPos const& position,
140 ::BlockSource& region,
141 ::Random& random,
142 ::BoundingBox const& chunkBB
143 ) /*override*/;
144
145 virtual ~WoodlandMansionPiece() /*override*/;
146 // NOLINTEND
147
148 public:
149 // member functions
150 // NOLINTBEGIN
151 MCAPI WoodlandMansionPiece(
152 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
153 ::std::string const& templateName,
154 ::BlockPos const& origin,
155 ::Rotation rotation
156 );
157
158 MCAPI WoodlandMansionPiece(
159 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
160 ::std::string const& templateName,
161 ::BlockPos const& origin,
162 ::Rotation rotation,
163 ::Mirror mirror
164 );
165
166 MCAPI void _addChest(
167 ::std::string const& markerId,
168 ::BlockPos const& position,
169 ::BlockSource& region,
170 ::Random& random,
171 ::BoundingBox const& chunkBB
172 );
173
174 MCAPI void _loadTemplate();
175 // NOLINTEND
176
177 public:
178 // constructor thunks
179 // NOLINTBEGIN
180 MCAPI void* $ctor(
181 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
182 ::std::string const& templateName,
183 ::BlockPos const& origin,
184 ::Rotation rotation
185 );
186
187 MCAPI void* $ctor(
188 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
189 ::std::string const& templateName,
190 ::BlockPos const& origin,
191 ::Rotation rotation,
192 ::Mirror mirror
193 );
194 // NOLINTEND
195
196 public:
197 // destructor thunk
198 // NOLINTBEGIN
199 MCAPI void $dtor();
200 // NOLINTEND
201
202 public:
203 // virtual function thunks
204 // NOLINTBEGIN
205 MCAPI ::StructurePieceType $getType() const;
206
207 MCAPI void $postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
208
209 MCAPI void $_handleDataMarker(
210 ::std::string const& markerId,
211 ::BlockPos const& position,
212 ::BlockSource& region,
213 ::Random& random,
214 ::BoundingBox const& chunkBB
215 );
216
217
218 // NOLINTEND
219
220 public:
221 // vftables
222 // NOLINTBEGIN
223 MCNAPI static void** $vftable();
224 // NOLINTEND
225 };
226
228 public:
229 // virtual functions
230 // NOLINTBEGIN
231 virtual ~FirstFloorRoomCollection() /*override*/ = default;
232
233 virtual ::std::string get1x1(::Random& random) /*override*/;
234
235 virtual ::std::string get1x1Secret(::Random& random) /*override*/;
236
237 virtual ::std::string get1x2SideEntrance(::Random& random, bool isStairsRoom) /*override*/;
238
239 virtual ::std::string get1x2FrontEntrance(::Random& random, bool isStairsRoom) /*override*/;
240
241 virtual ::std::string get1x2Secret(::Random& random) /*override*/;
242
243 virtual ::std::string get2x2(::Random& random) /*override*/;
244
245 virtual ::std::string get2x2Secret(::Random& random) /*override*/;
246 // NOLINTEND
247
248 public:
249 // virtual function thunks
250 // NOLINTBEGIN
251 MCAPI ::std::string $get1x1(::Random& random);
252
253 MCFOLD ::std::string $get1x1Secret(::Random& random);
254
255 MCAPI ::std::string $get1x2SideEntrance(::Random& random, bool isStairsRoom);
256
257 MCAPI ::std::string $get1x2FrontEntrance(::Random& random, bool isStairsRoom);
258
259 MCAPI ::std::string $get1x2Secret(::Random& random);
260
261 MCAPI ::std::string $get2x2(::Random& random);
262
263 MCFOLD ::std::string $get2x2Secret(::Random& random);
264
265
266 // NOLINTEND
267
268 public:
269 // vftables
270 // NOLINTBEGIN
271 MCNAPI static void** $vftable();
272 // NOLINTEND
273 };
274
275 class MansionGrid {
276 public:
277 // member variables
278 // NOLINTBEGIN
279 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>> mBaseGrid;
280 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>> mThirdFloorGrid;
281 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::WoodlandMansionPieces::SimpleGrid>>> mFloorRooms;
282 ::ll::TypedStorage<4, 4, int> mEntranceX;
283 ::ll::TypedStorage<4, 4, int> mEntranceY;
284 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
285 // NOLINTEND
286
287 public:
288 // prevent constructor by default
289 MansionGrid& operator=(MansionGrid const&);
290 MansionGrid(MansionGrid const&);
291 MansionGrid();
292
293 public:
294 // member functions
295 // NOLINTBEGIN
296 MCAPI explicit MansionGrid(::Random& random);
297
298 MCAPI bool _cleanEdges(::WoodlandMansionPieces::SimpleGrid& grid);
299
300 MCAPI void
302
303 MCAPI void
304 _recursiveCorridor(::WoodlandMansionPieces::SimpleGrid& grid, int x, int y, uchar heading, int depth);
305
306 MCAPI void _setupThirdFloor();
307
308 MCAPI uchar get1x2RoomDirection(
310 int x,
311 int y,
312 int floorNum,
313 int roomId
314 ) const;
315 // NOLINTEND
316
317 public:
318 // constructor thunks
319 // NOLINTBEGIN
320 MCAPI void* $ctor(::Random& random);
321 // NOLINTEND
322 };
323
324 class MansionPiecePlacer {
325 public:
326 // member variables
327 // NOLINTBEGIN
328 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::StructureManager>> mStructureManager;
329 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
330 ::ll::TypedStorage<4, 4, int> mStartX;
331 ::ll::TypedStorage<4, 4, int> mStartY;
332 // NOLINTEND
333
334 public:
335 // prevent constructor by default
336 MansionPiecePlacer& operator=(MansionPiecePlacer const&);
337 MansionPiecePlacer(MansionPiecePlacer const&);
338 MansionPiecePlacer();
339
340 public:
341 // member functions
342 // NOLINTBEGIN
343 MCAPI void _addRoom1x1(
344 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
345 ::BlockPos const& roomPos,
346 ::Rotation rotation,
347 uchar doorDir,
349 );
350
351 MCAPI void _addRoom1x2(
352 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
353 ::BlockPos const& roomPos,
354 ::Rotation rotation,
355 uchar roomDir,
356 uchar doorDir,
358 bool isStairsRoom
359 );
360
361 MCAPI void _addRoom2x2(
362 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
363 ::BlockPos const& roomPos,
364 ::Rotation rotation,
365 uchar roomDir,
366 uchar doorDir,
368 );
369
370 MCAPI void _addRoom2x2Secret(
371 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
372 ::BlockPos const& roomPos,
373 ::Rotation rotation,
375 );
376
377 MCAPI void _createRoof(
378 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
379 ::BlockPos const& roofOrigin,
380 ::Rotation rotation,
383 );
384
385 MCAPI void _entrance(
386 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
388 );
389
390 MCAPI void _traverseInnerTurn(
391 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
393 );
394
395 MCAPI void _traverseOuterWalls(
396 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
399 uchar gridDirection,
400 int startX,
401 int startY,
402 int endX,
403 int endY
404 );
405
406 MCAPI void _traverseTurn(
407 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
409 );
410
411 MCAPI void _traverseWallPiece(
412 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
414 );
415
416 MCAPI void createMansion(
417 ::BlockPos const& origin,
418 ::Rotation rotation,
419 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
421 );
422 // NOLINTEND
423 };
424
426 public:
427 // virtual functions
428 // NOLINTBEGIN
429 virtual ~SecondFloorRoomCollection() /*override*/ = default;
430
431 virtual ::std::string get1x1(::Random& random) /*override*/;
432
433 virtual ::std::string get1x1Secret(::Random& random) /*override*/;
434
435 virtual ::std::string get1x2SideEntrance(::Random& random, bool isStairsRoom) /*override*/;
436
437 virtual ::std::string get1x2FrontEntrance(::Random& random, bool isStairsRoom) /*override*/;
438
439 virtual ::std::string get1x2Secret(::Random& random) /*override*/;
440
441 virtual ::std::string get2x2(::Random& random) /*override*/;
442
443 virtual ::std::string get2x2Secret(::Random& random) /*override*/;
444 // NOLINTEND
445
446 public:
447 // virtual function thunks
448 // NOLINTBEGIN
449 MCAPI ::std::string $get1x1(::Random& random);
450
451 MCFOLD ::std::string $get1x1Secret(::Random& random);
452
453 MCAPI ::std::string $get1x2SideEntrance(::Random& random, bool isStairsRoom);
454
455 MCAPI ::std::string $get1x2FrontEntrance(::Random& random, bool isStairsRoom);
456
457 MCAPI ::std::string $get1x2Secret(::Random& random);
458
459 MCAPI ::std::string $get2x2(::Random& random);
460
461 MCFOLD ::std::string $get2x2Secret(::Random& random);
462
463
464 // NOLINTEND
465
466 public:
467 // vftables
468 // NOLINTBEGIN
469 MCNAPI static void** $vftable();
470 // NOLINTEND
471 };
472
474 public:
475 // virtual functions
476 // NOLINTBEGIN
477 virtual ~ThirdFloorRoomCollection() /*override*/ = default;
478 // NOLINTEND
479
480 public:
481 // vftables
482 // NOLINTBEGIN
483 MCNAPI static void** $vftable();
484 // NOLINTEND
485 };
486
487public:
488 // static functions
489 // NOLINTBEGIN
490 MCAPI static void generateMansion(
491 ::Bedrock::NotNullNonOwnerPtr<::StructureManager> structureManager,
492 ::BlockPos const& origin,
493 ::Rotation rotation,
494 ::std::vector<::std::unique_ptr<::StructurePiece>>& pieces,
495 ::Random& random
496 );
497 // NOLINTEND
498};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition BoundingBox.h:13
Definition Random.h:10
Definition StructureManager.h:45
Definition StructurePiece.h:18
Definition TemplateStructurePiece.h:18
Definition WoodlandMansionPieces.h:227
Definition WoodlandMansionPieces.h:38
Definition WoodlandMansionPieces.h:275
Definition WoodlandMansionPieces.h:324
Definition WoodlandMansionPieces.h:425
Definition WoodlandMansionPieces.h:94
Definition WoodlandMansionPieces.h:473
Definition WoodlandMansionPieces.h:111
Definition WoodlandMansionPieces.h:22
Definition WoodlandMansionPieces.h:72