LeviLamina
Loading...
Searching...
No Matches
PoolElementStructurePiece.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/Rotation.h"
7#include "mc/world/level/BlockPos.h"
8#include "mc/world/level/levelgen/structure/BoundingBox.h"
9#include "mc/world/level/levelgen/structure/JigsawJunction.h"
10#include "mc/world/level/levelgen/structure/StructurePiece.h"
11#include "mc/world/level/levelgen/v1/AdjustmentEffect.h"
12
13// auto generated forward declare list
14// clang-format off
15class Block;
16class BlockSource;
17class BlockVolume;
18class ChunkPos;
19class Dimension;
20class Random;
23// clang-format on
24
25class PoolElementStructurePiece : public ::StructurePiece {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<4, 24, ::BoundingBox> mCachedPieceBounds;
30 ::ll::TypedStorage<4, 4, int> mCachedPieceBaseY;
31 ::ll::TypedStorage<4, 4, int> mCachedXCenter;
32 ::ll::TypedStorage<4, 4, int> mCachedZCenter;
33 ::ll::TypedStorage<4, 4, float> mCachedMaxRadius;
34 ::ll::TypedStorage<8, 8, ::StructurePoolElement const&> mElement;
35 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
36 ::ll::TypedStorage<1, 1, ::Rotation> mRotation;
37 ::ll::TypedStorage<4, 24, ::JigsawJunction> mJigsawJunction;
38 ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::optional<::ActorDefinitionIdentifier>>>
39 mEntitiesToPlace;
40 ::ll::TypedStorage<4, 12, ::BlockPos> mRefPos;
41 // NOLINTEND
42
43public:
44 PoolElementStructurePiece(
45 ::StructurePoolElement const& element,
46 ::BlockPos position,
47 ::Rotation rotation,
48 int genDepth,
49 ::JigsawJunction& junction,
50 ::BoundingBox const& box,
51 ::BlockPos refPos
52 )
53 : mElement(element),
54 mPosition(position),
55 mRotation(rotation),
56 mJigsawJunction(junction),
57 mRefPos(refPos) {
58 mCachedPieceBaseY = 0;
59 mCachedXCenter = 0;
60 mCachedZCenter = 0;
61 mCachedMaxRadius = 0.0f;
62 mBoundingBox = box;
63 mGenDepth = genDepth;
64 }
65
66public:
67 // prevent constructor by default
68 PoolElementStructurePiece& operator=(PoolElementStructurePiece const&);
69 PoolElementStructurePiece(PoolElementStructurePiece const&);
70 PoolElementStructurePiece();
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 virtual bool postProcess(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB) /*override*/;
76
77 virtual void postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB) /*override*/;
78
79 virtual void moveBoundingBox(int dx, int dy, int dz) /*override*/;
80
81 virtual int generateHeightAtPosition(
82 ::BlockPos const& pos,
83 ::Dimension& dim,
84 ::BlockVolume& box,
85 ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::std::vector<short>>>& chunkHeightCache
86 ) const = 0;
87
88 virtual ::Block const*
89 getSupportBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const = 0;
90
91 virtual ::Block const& getBeardStabilizeBlock(::Block const& foundationBlock) const = 0;
92
93 virtual ::AdjustmentEffect getTerrainAdjustmentEffect() const = 0;
94
95 virtual bool _needsPostProcessing(::BlockSource& region);
96
97 virtual ~PoolElementStructurePiece() /*override*/;
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI bool $postProcess(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
110
111 MCAPI void $postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
112
113 MCAPI void $moveBoundingBox(int dx, int dy, int dz);
114
115 MCFOLD bool $_needsPostProcessing(::BlockSource& region);
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCNAPI static void** $vftable();
124 // NOLINTEND
125};
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition BlockVolume.h:14
Definition Block.h:41
Definition BoundingBox.h:13
Definition ChunkPos.h:13
Definition Dimension.h:86
static MCAPI void ** $vftable()
Definition Random.h:10
Definition StructurePiece.h:18
Definition StructurePoolElement.h:39
Definition ActorDefinitionIdentifier.h:15
Definition JigsawJunction.h:9