26class StructureFeature {
29 using StructureMap = ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>;
34 ::ll::TypedStorage<8, 48, ::HashedString> mStructureFeatureType;
35 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>> mCachedStructures;
36 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mCacheMutex;
37 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ChunkPos>> mVisitedPositions;
38 ::ll::TypedStorage<4, 4, uint> mRadius;
39 ::ll::TypedStorage<4, 4, int> mXScale;
40 ::ll::TypedStorage<4, 4, int> mZScale;
41 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mCreateBlueprintsAndVisitedPositionsMutex;
42 ::ll::TypedStorage<8, 72, ::std::condition_variable> mBlueprintWaitVar;
43 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mActiveBlueprintCreateCount;
44 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mBlueprintsFinished;
54 virtual ~StructureFeature();
56 virtual bool shouldAddHardcodedSpawnAreas()
const;
58 virtual bool shouldPostProcessMobs()
const;
60 virtual ::gsl::span<::BiomeIdType const> getRequiredBiomes()
const;
62 virtual bool getNearestGeneratedFeature(
68 bool mustBeInNewChunks,
69 ::std::optional<::HashedString>
const& biomeTag
72 virtual bool isFeatureChunk(
81 virtual ::std::unique_ptr<::StructureStart> createStructureStart(
89 virtual ::StructureStart* getStructureAt(
int cellX,
int cellY,
int cellZ);
95 MCAPI StructureFeature(uint seed,
::HashedString structureFeatureType);
97 MCAPI
void addFeature(
107 MCAPI ::BlockPos chunkStartAtSurfaceLevel(
113 MCAPI
void createBlueprints(
128 MCAPI
void postProcessMobsAt(
::BlockSource& region,
int chunkWestBlock,
int chunkNorthBlock,
::Random& random);
134 MCAPI
static bool findNearestFeaturePositionBySpacing(
137 ::StructureFeature& feature,
138 ::std::optional<::HashedString>
const& biomeTag,
143 int minFeatureSeparation,
147 bool mustBeInNewChunks
150 MCAPI static ::std::pair<::BlockPos const, ::Biome const*> getBiomeForFeatureGeneration(
156 MCAPI static ::ChunkPos getChunkPosInSpace(
166 MCAPI
static void setRandomSeedFor(
::Random& result,
int x,
int z,
int salt, uint levelSeed);
172 MCAPI
void* $ctor(uint seed,
::HashedString structureFeatureType);
184 MCFOLD
bool $shouldAddHardcodedSpawnAreas()
const;
186 MCFOLD
bool $shouldPostProcessMobs()
const;
188 MCFOLD ::gsl::span<::BiomeIdType const> $getRequiredBiomes()
const;
190 MCAPI
bool $getNearestGeneratedFeature(
196 bool mustBeInNewChunks,
197 ::std::optional<::HashedString>
const& biomeTag
200 MCAPI ::StructureStart* $getStructureAt(
int cellX,
int cellY,
int cellZ);