23class StructureFeature {
26 using StructureMap = ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>;
31 ::ll::TypedStorage<8, 48, ::HashedString> mStructureFeatureType;
32 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ChunkPos, ::std::unique_ptr<::StructureStart>>> mCachedStructures;
33 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mCacheMutex;
34 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ChunkPos>> mVisitedPositions;
35 ::ll::TypedStorage<4, 4, uint> mRadius;
36 ::ll::TypedStorage<4, 4, int> mXScale;
37 ::ll::TypedStorage<4, 4, int> mZScale;
38 ::ll::TypedStorage<8, 80, ::std::mutex> mCreateBlueprintsAndVisitedPositionsMutex;
39 ::ll::TypedStorage<8, 72, ::std::condition_variable> mBlueprintWaitVar;
40 ::ll::TypedStorage<4, 4, ::std::atomic<int>> mActiveBlueprintCreateCount;
41 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mBlueprintsFinished;
51 virtual ~StructureFeature();
53 virtual bool shouldAddHardcodedSpawnAreas()
const;
55 virtual bool shouldPostProcessMobs()
const;
57 virtual ::gsl::span<::BiomeIdType const> getRequiredBiomes()
const;
59 virtual bool getNearestGeneratedFeature(
65 bool mustBeInNewChunks,
66 ::std::optional<::HashedString>
const& biomeTag
69 virtual bool isFeatureChunk(
79 virtual ::std::unique_ptr<::StructureStart> createStructureStart(
87 virtual ::std::unique_ptr<::StructureStart> createStructureStart(
96 virtual ::StructureStart* getStructureAt(
int cellX,
int cellY,
int cellZ);
102 MCAPI StructureFeature(uint seed,
::HashedString structureFeatureType);
104 MCAPI
void createBlueprints(
115 MCAPI
void postProcessMobsAt(
::BlockSource& region,
int chunkWestBlock,
int chunkNorthBlock,
::Random& random);
121 MCAPI
static bool findNearestFeaturePositionBySpacing(
124 ::StructureFeature& feature,
125 ::std::optional<::HashedString>
const& biomeTag,
130 int minFeatureSeparation,
134 bool mustBeInNewChunks
137 MCAPI static ::ChunkPos getChunkPosInSpace(
151 MCAPI
void* $ctor(uint seed,
::HashedString structureFeatureType);
163 MCFOLD
bool $shouldAddHardcodedSpawnAreas()
const;
165 MCFOLD
bool $shouldPostProcessMobs()
const;
167 MCFOLD ::gsl::span<::BiomeIdType const> $getRequiredBiomes()
const;
169 MCAPI
bool $getNearestGeneratedFeature(
175 bool mustBeInNewChunks,
176 ::std::optional<::HashedString>
const& biomeTag
179 MCAPI ::StructureStart* $getStructureAt(
int cellX,
int cellY,
int cellZ);