24class StructureFeature {
27 using StructureMap = ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>;
32 ::ll::TypedStorage<8, 48, ::HashedString> mStructureFeatureType;
33 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>> mCachedStructures;
34 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mCacheMutex;
35 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ChunkPos>> mVisitedPositions;
36 ::ll::TypedStorage<4, 4, uint> mRadius;
37 ::ll::TypedStorage<4, 4, int> mXScale;
38 ::ll::TypedStorage<4, 4, int> mZScale;
39 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mCreateBlueprintsAndVisitedPositionsMutex;
40 ::ll::TypedStorage<8, 72, ::std::condition_variable> mBlueprintWaitVar;
41 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mActiveBlueprintCreateCount;
42 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mBlueprintsFinished;
52 virtual ~StructureFeature();
54 virtual bool shouldAddHardcodedSpawnAreas()
const;
56 virtual bool shouldPostProcessMobs()
const;
58 virtual ::gsl::span<::BiomeIdType const> getRequiredBiomes()
const;
60 virtual bool getNearestGeneratedFeature(
66 bool mustBeInNewChunks,
67 ::std::optional<::HashedString>
const& biomeTag
70 virtual bool isFeatureChunk(
79 virtual ::std::unique_ptr<::StructureStart> createStructureStart(
87 virtual ::StructureStart* getStructureAt(
int cellX,
int cellY,
int cellZ);
93 MCAPI StructureFeature(uint seed,
::HashedString structureFeatureType);
95 MCAPI
void addFeature(
103 MCAPI
void createBlueprints(
116 MCAPI
bool isInsideBoundingFeature(
int cellX,
int cellY,
int cellZ);
118 MCAPI
void postProcessMobsAt(
::BlockSource& region,
int chunkWestBlock,
int chunkNorthBlock,
::Random& random);
124 MCAPI
static bool findNearestFeaturePositionBySpacing(
127 ::StructureFeature& feature,
128 ::std::optional<::HashedString>
const& biomeTag,
133 int minFeatureSeparation,
137 bool mustBeInNewChunks
140 MCAPI static ::ChunkPos getChunkPosInSpace(
154 MCAPI
void* $ctor(uint seed,
::HashedString structureFeatureType);
166 MCFOLD
bool $shouldAddHardcodedSpawnAreas()
const;
168 MCFOLD
bool $shouldPostProcessMobs()
const;
170 MCFOLD ::gsl::span<::BiomeIdType const> $getRequiredBiomes()
const;
172 MCAPI
bool $getNearestGeneratedFeature(
178 bool mustBeInNewChunks,
179 ::std::optional<::HashedString>
const& biomeTag
182 MCAPI ::StructureStart* $getStructureAt(
int cellX,
int cellY,
int cellZ);