3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/string/BasicStackString.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/puv/Loader.h"
11#include "mc/platform/threading/Mutex.h"
12#include "mc/world/level/chunk/ChunksLoadedStatus.h"
13#include "mc/world/level/chunk/QueueRequestResult.h"
14#include "mc/world/level/levelgen/structure/StructureDeleteResult.h"
36namespace Core {
class Path; }
37namespace SharedTypes::v1_21_80 {
struct JigsawStructureMetadata; }
38namespace SharedTypes::v1_21_80 {
struct JigsawStructureMetadataFile; }
39namespace SharedTypes::v1_21_80 {
struct JigsawStructureMetadataRegistry; }
40namespace cereal {
struct ReflectionCtx; }
47 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mRepositoryMutex;
48 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::LegacyStructureTemplate>>>
49 mLegacyStructureRepository;
50 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::StructureTemplate>>>
52 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::StructureAnimationData>>> mStructurePlacementQueue;
53 ::ll::TypedStorage<4, 4, uint> mStructurePlacementSaveCounter;
54 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::IUnknownBlockTypeRegistry>> mUnknownBlockRegistry;
55 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::ResourcePackManager>
const> mPackManager;
59 ::std::unordered_map<uint64, ::std::shared_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadata>>>
61 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMetadataRegistryMutex;
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::ReflectionCtx>> mCerealContext;
82 ::std::string
const& structureName,
92 ::std::string& resourceStream
96 ::std::string_view structureNamespace,
100 ::std::string& resourceStream
110 ::std::function<::ChunksLoadedStatus(
::Tick)>
const& areChunksLoaded
121 MCNAPI ::StructureTemplate&
126 MCNAPI ::StructureTemplate&
getOrCreate(::std::string
const& structureName);
128 MCNAPI ::std::shared_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadata>
133 MCNAPI ::StructureTemplate*
getStructure(::std::string
const& structureName)
const;
154 MCNAPI
void queueLoad(::std::unique_ptr<::StructureAnimationData> structureAnimationData);
165 ::std::unique_ptr<::CommandArea> cmdArea,
172 ::std::unique_ptr<::StructureAnimationData> structureAnimationData
179 MCNAPI static ::std::unique_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadataRegistry>
186 ::std::string& fileData,
190 MCNAPI static ::Core::PathBuffer<::Core::BasicStackString<char, 1024>>
Definition EnableNonOwnerReferences.h:7
Definition NonOwnerPointer.h:9
Definition BoundingBox.h:13
Definition ChunkLoadActionList.h:21
Definition CommandArea.h:5
Definition CompoundTag.h:13
Definition BasicStackString.h:8
Definition PathBuffer.h:8
Definition Dimension.h:83
Definition IUnknownBlockTypeRegistry.h:14
Definition LegacyStructureTemplate.h:24
Definition LevelStorage.h:25
Definition PackInstance.h:23
Definition ResourcePackManager.h:24
Definition ServerLevel.h:54
Definition StructureAnimationData.h:17
Definition StructureManager.h:43
MCAPI::LegacyStructureTemplate * _readLegacyStructure(::std::string const &name)
static MCAPI void _metadataPackForEachCallback(::SharedTypes::v1_21_80::JigsawStructureMetadataRegistry ®istry, ::Puv::Loader<::SharedTypes::v1_21_80::JigsawStructureMetadataFile > &loader, ::PackInstance const &pack, ::std::string &fileData, ::Core::Path const &filenameWithExtension)
MCAPI bool load(::StructureTemplate &structureTemplate, ::ResourcePackManager const *packManager, ::LevelStorage *levelStorage)
MCAPI::LegacyStructureTemplate & getOrCreateLegacy(::std::string const &structureName)
MCAPI bool _findResource(::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &structurePath, ::PackInstance const &pack, ::std::string &resourceStream)
MCAPI::StructureTemplate & cloneStructure(::StructureTemplate const &structureTemplate, ::std::string const &structureName)
static MCAPI char const *& BEHAVIOR_PACK_STRUCTURES_FOLDER()
MCAPI bool _findResource(::std::string_view structureNamespace, ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &structurePath, ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > const &rootStructurePath, ::PackInstance const &pack, ::std::string &resourceStream)
static MCAPI ::std::unique_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadataRegistry > _loadMetadataRegistries(::cereal::ReflectionCtx const &ctx, ::ResourcePackManager &packManager, bool excludeLatest)
MCAPI bool _placeSegment(::StructureAnimationData &structureAnimationData)
MCAPI bool _placeSegment(::Dimension &dimension, ::StructureAnimationData &structureAnimationData, ::ChunkLoadActionList &chunkLoadActionList, ::BoundingBox const &boundingBox, ::std::function<::ChunksLoadedStatus(::Tick)> const &areChunksLoaded)
MCAPI void loadMetadataRegistries()
MCAPI::StructureTemplate * getStructure(::std::string const &structureName) const
MCAPI void importStructureFromTemplate(::std::string name, ::StructureTemplate const &temp)
MCAPI::StructureTemplate & getOrCreate(::std::string const &structureName)
MCAPI::StructureTemplate * _createAndLoadStructure(::std::string const &structureName, ::ResourcePackManager const *packManager, ::LevelStorage *levelStorage)
MCAPI void setUnknownBlockRegistry(::Bedrock::NonOwnerPointer<::IUnknownBlockTypeRegistry > unknownBlockRegistry)
MCAPI StructureManager(::ResourcePackManager &packManager)
MCAPI void * $ctor(::ResourcePackManager &packManager)
MCAPI void tick(::Dimension const &dimension)
MCAPI::StructureDeleteResult deleteStructure(::std::string const &structureName, ::LevelStorage &levelStorage)
MCAPI void _savePlacementQueueItem(::std::string const &dimensionPrefix, ::StructureAnimationData &structureAnimationData)
MCAPI::QueueRequestResult tryPlaceStructureInWorld(::std::unique_ptr<::CommandArea > cmdArea, ::ServerLevel &level, ::Dimension &dimension, ::BoundingBox const &bounds, ::BlockPos const &loadPosition, ::StructureSettings const &settings, ::StructureTemplate const &structureTemplate, ::std::unique_ptr<::StructureAnimationData > structureAnimationData)
MCAPI::std::string _createLevelStorageId(::std::string const &dimensionPrefix, ::std::string const &saveId)
MCAPI ::std::shared_ptr<::SharedTypes::v1_21_80::JigsawStructureMetadata > getOrCreateJigsawStructureMetadata(::StructurePoolElement const &structurePoolElement)
static MCAPI char const *& LEVEL_STORAGE_STRUCTURE_TEMPLATE_PREFIX()
MCAPI void _removePlacementQueueItem(::std::string const &dimensionPrefix, ::StructureAnimationData &structureAnimationData)
MCAPI void loadPlacementQueueItem(::std::string const &key, ::CompoundTag const &tag, ::Level &level, ::Dimension &dimension)
MCAPI bool readStructure(::StructureTemplate &structureTemplate)
static MCAPI ::Core::PathBuffer<::Core::BasicStackString< char, 1024 > > getStructurePath(::std::string_view structureNamespace, ::std::string_view structureName)
MCAPI bool loadLegacy(::LegacyStructureTemplate &structure, ::std::string &data)
MCAPI void saveToLevel(::StructureTemplate const &structureTemplate, ::LevelStorage &levelStorage)
MCAPI void loadPlacementQueue(::LevelStorage &storage, ::Level &level, ::Dimension &dimension)
MCAPI void queueLoad(::std::unique_ptr<::StructureAnimationData > structureAnimationData)
MCAPI ::std::vector<::std::string > getStructureNames(::LevelStorage &levelStorage, bool includeUnremovable) const
static MCAPI void ** $vftable()
Definition StructurePoolElement.h:37
Definition StructureSettings.h:18
Definition StructureTemplate.h:32
Definition ReflectionCtx.h:11