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 // NOLINTEND
97
98public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI void _fillWithSupportBlock(
102 ::BlockPos const& startPos,
103 ::BlockSource& region,
104 ::BoundingBox const& chunkBB,
105 ::Block const& blockToFill,
106 ::Random& random
107 );
108
109 MCAPI void _stabilizeBeard(::BlockPos const& startPos, ::BlockSource& region, ::Block const& blockToFill);
110 // NOLINTEND
111
112public:
113 // constructor thunks
114 // NOLINTBEGIN
115 MCAPI void* $ctor(
116 ::StructurePoolElement const& element,
117 ::BlockPos position,
118 ::Rotation rotation,
119 int genDepth,
120 ::JigsawJunction& junction,
121 ::BoundingBox const& box,
122 ::BlockPos refPos
123 );
124 // NOLINTEND
125
126public:
127 // virtual function thunks
128 // NOLINTBEGIN
129 MCAPI bool $postProcess(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
130
131 MCAPI void $postProcessMobsAt(::BlockSource& region, ::Random& random, ::BoundingBox const& chunkBB);
132
133 MCAPI void $moveBoundingBox(int dx, int dy, int dz);
134
135 MCFOLD bool $_needsPostProcessing(::BlockSource& region);
136
137
138 // NOLINTEND
139
140public:
141 // vftables
142 // NOLINTBEGIN
143 MCNAPI static void** $vftable();
144 // NOLINTEND
145};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BlockVolume.h:14
Definition Block.h:69
Definition BoundingBox.h:13
Definition ChunkPos.h:11
Definition Dimension.h:89
static MCAPI void ** $vftable()
Definition Random.h:10
Definition StructurePiece.h:21
Definition StructurePoolElement.h:39
Definition ActorDefinitionIdentifier.h:15
Definition JigsawJunction.h:9