LeviLamina
Loading...
Searching...
No Matches
MainChunkSource Class Reference
Inheritance diagram for MainChunkSource:

Public Types

enum class  LoadMode : int { None = 0 , Deferred = 1 }

Public Member Functions

virtual ::std::shared_ptr<::LevelChunkgetExistingChunk (::ChunkPos const &cp)
virtual bool isChunkKnown (::ChunkPos const &chunkPos)
virtual ::std::shared_ptr<::LevelChunkgetRandomChunk (::Random &random)
virtual ::std::shared_ptr<::LevelChunkcreateNewChunk (::ChunkPos const &cp, ::ChunkSource::LoadMode lm, bool readOnly)
virtual void acquireDiscarded (::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter > ptr)
virtual ::std::unordered_map<::ChunkPos, ::std::weak_ptr<::LevelChunk > > const & getStorage () const
virtual void clearDeletedEntities ()
virtual ::std::unordered_map<::ChunkPos, ::std::weak_ptr<::LevelChunk > > const * getChunkMap ()
virtual bool canCreateViews () const
virtual void setLevelChunk (::std::shared_ptr<::LevelChunk > lc)
MCAPI_C void * $ctor (::std::unique_ptr<::ChunkSource > storage)
MCFOLD ::std::shared_ptr<::LevelChunk$getExistingChunk (::ChunkPos const &cp)
MCAPI bool $isChunkKnown (::ChunkPos const &chunkPos)
MCAPI ::std::shared_ptr<::LevelChunk$getRandomChunk (::Random &random)
MCAPI ::std::shared_ptr<::LevelChunk$createNewChunk (::ChunkPos const &cp, ::ChunkSource::LoadMode lm, bool readOnly)
MCFOLD void $acquireDiscarded (::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter > ptr)
MCFOLD ::std::unordered_map<::ChunkPos, ::std::weak_ptr<::LevelChunk > > const & $getStorage () const
MCAPI void $clearDeletedEntities ()
MCFOLD ::std::unordered_map<::ChunkPos, ::std::weak_ptr<::LevelChunk > > const * $getChunkMap ()
MCFOLD bool $canCreateViews () const
MCAPI void $setLevelChunk (::std::shared_ptr<::LevelChunk > lc)
virtual void shutdown ()
virtual bool isShutdownDone ()
virtual bool isChunkSaved (::ChunkPos const &chunkPos)
virtual ::std::shared_ptr<::LevelChunkgetOrLoadChunk (::ChunkPos const &cp, ::ChunkSource::LoadMode lm, bool readOnly)
virtual bool structurePostProcessChunk (::ChunkViewSource &)
virtual bool decorationPostProcessChunk (::ChunkViewSource &)
virtual void checkAndReplaceChunk (::ChunkViewSource &, ::LevelChunk &)
virtual bool verifyChunkNeedsNeighborAwareUpgrade (::LevelChunk &)
virtual void neighborAwareChunkUpgrade (::LevelChunk &, ::ChunkViewSource &)
virtual void loadChunk (::LevelChunk &lc, bool forceImmediateReplacementDataLoad)
virtual void postProcessMobsAt (::BlockSource &region, int chunkWestBlock, int chunkNorthBlock, ::Random &random)
virtual void postProcessMobsAt (::BlockSource &region, ::BoundingBox const &chunkBB) const
virtual bool saveLiveChunk (::LevelChunk &lc)
virtual void writeEntityChunkTransfer (::LevelChunk &levelChunk)
virtual void writeEntityChunkTransfersToUnloadedChunk (::ChunkKey const &chunkKey, ::std::vector<::ActorUnloadedChunkTransferEntry > const &transfers)
virtual void deserializeActorStorageToLevelChunk (::LevelChunk &levelChunk)
virtual void hintDiscardBatchBegin ()
virtual void hintDiscardBatchEnd ()
virtual void compact ()
virtual void flushPendingDiscardedChunkWrites ()
virtual void flushThreadBatch ()
virtual bool isWithinWorldLimit (::ChunkPos const &cp) const
virtual ::std::unique_ptr<::BlendingDataProvidertryGetBlendingDataProvider ()
virtual ::std::shared_ptr<::LevelChunkMetaDataDictionaryloadLevelChunkMetaDataDictionary ()
virtual bool canLaunchTasks () const
virtual bool chunkPosNeedsBlending (::ChunkPos const &cp)
MCAPI bool _checkAndDispatchTaskForLevelChunk (::std::pair<::ChunkPos, ::ChunkState > const &chunkPosAndExpectedState, bool areInTask)
MCAPI void _checkForReplacementDataTask (::LevelChunk &lc, ::ChunkViewSource &chunks)
MCAPI void _checkForUnblockingChunks (::LevelChunk const &lc)
MCAPI void _checkLevelChunkForNextStage (::LevelChunk const &lc, ::LevelChunkGridAreaElement<::std::weak_ptr<::LevelChunk > > &grid, ::ChunkState stateToCheck)
MCAPI void _checkSpecificLevelChunkForUnblocking (::LevelChunk const &lc, ::LevelChunkGridAreaElement<::std::weak_ptr<::LevelChunk > > &grid)
MCAPI bool _chunkAtStage (::std::weak_ptr<::LevelChunk > lcwp, ::ChunkState stateToCheck)
MCAPI void _createOrReplaceGridAreaMap (::std::shared_ptr<::LevelChunk > lc, bool createNeighbourGridsIfMissing)
MCAPI void _decorationPostProcessingTask (::LevelChunk &lc, ::ChunkViewSource &chunks)
MCAPI void _dispatchTaskForLevelChunk (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _freeChunkGenerationGridMap (::ChunkPos const &cp, bool isLevelChunkDeletion)
MCAPI void _handleTaskFailure (::LevelChunk &levelChunk, ::ChunkState currentState, ::ChunkState previousState)
MCAPI void _launchChunkTask (::std::string_view taskName, ::ChunkPos const &chunkPos, bool areInTask, ::brstd::move_only_function<::TaskResult()> taskFunc)
MCAPI void _launchDecorationPostProcessingTask (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _launchLightingTask (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _launchNeighborAwareUpgradeTask (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _launchReplacementDataTask (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _launchStructurePostProcessingTask (::std::shared_ptr<::LevelChunk > const &lc, ::std::shared_ptr<::ChunkViewSource > const &chunks, bool areInTask)
MCAPI void _lightingTask (::std::shared_ptr<::LevelChunk > const &lc, ::ChunkViewSource &chunks)
MCAPI void _loadChunkTask (::LevelChunk &lc)
MCAPI void _neighborAwareUpgradeTask (::LevelChunk &lc, ::ChunkViewSource &chunks)
MCAPI void _saveDirtyChunks (::LevelStorage &)
MCAPI void _spawnChunkGenerationTasks (int numTasks, bool calledFromTask)
MCAPI_C void addEmptyChunkPosForProcessingNeighbours (::std::shared_ptr<::LevelChunk > lc)
MCAPI void checkAndLaunchChunkGenerationTasks (bool calledFromTask)
MCAPI ::GridArea<::std::shared_ptr<::LevelChunk > > createEmptyView (::ChunkSource::LoadMode lm, bool circle, ::std::function< void(::buffer_span_mut<::std::shared_ptr<::LevelChunk > >, ::buffer_span< uint >)> add, ::ChunkSourceViewGenerateMode chunkViewGenerateMode, float const *serverBuildRatio)
MCAPI ::std::shared_ptr<::LevelChunkgetAvailableChunk (::ChunkPos const &cp)
MCAPI_C ::std::shared_ptr<::LevelChunkgetAvailableChunkAt (::BlockPos const &pos)
MCAPI void initializeWithLevelStorageManagerConnector (::ILevelStorageManagerConnector &levelStorageManagerConnector)
MCAPI bool shouldServerGeneratePos (::ChunkPos const &chunkPos, float serverBuildRatio, int viewRadius)
MCFOLD void * $ctor ()
MCFOLD void * $ctor (::Bedrock::EnableNonOwnerReferences const &)
MCAPI void $dtor ()
MCAPI void $shutdown ()
MCAPI bool $isShutdownDone ()
MCAPI bool $isChunkSaved (::ChunkPos const &chunkPos)
MCAPI ::std::shared_ptr<::LevelChunk$getOrLoadChunk (::ChunkPos const &cp, ::ChunkSource::LoadMode lm, bool readOnly)
MCFOLD bool $structurePostProcessChunk (::ChunkViewSource &)
MCFOLD bool $decorationPostProcessChunk (::ChunkViewSource &)
MCFOLD void $checkAndReplaceChunk (::ChunkViewSource &, ::LevelChunk &)
MCFOLD bool $verifyChunkNeedsNeighborAwareUpgrade (::LevelChunk &)
MCFOLD void $neighborAwareChunkUpgrade (::LevelChunk &, ::ChunkViewSource &)
MCAPI void $loadChunk (::LevelChunk &lc, bool forceImmediateReplacementDataLoad)
MCAPI void $postProcessMobsAt (::BlockSource &region, int chunkWestBlock, int chunkNorthBlock, ::Random &random)
MCAPI void $postProcessMobsAt (::BlockSource &region, ::BoundingBox const &chunkBB) const
MCAPI bool $saveLiveChunk (::LevelChunk &lc)
MCAPI void $writeEntityChunkTransfer (::LevelChunk &levelChunk)
MCAPI void $writeEntityChunkTransfersToUnloadedChunk (::ChunkKey const &chunkKey, ::std::vector<::ActorUnloadedChunkTransferEntry > const &transfers)
MCAPI void $deserializeActorStorageToLevelChunk (::LevelChunk &levelChunk)
MCAPI void $hintDiscardBatchBegin ()
MCAPI void $hintDiscardBatchEnd ()
MCAPI void $compact ()
MCAPI void $flushPendingDiscardedChunkWrites ()
MCAPI void $flushThreadBatch ()
MCFOLD bool $isWithinWorldLimit (::ChunkPos const &cp) const
MCAPI ::std::unique_ptr<::BlendingDataProvider$tryGetBlendingDataProvider ()
MCAPI ::std::shared_ptr<::LevelChunkMetaDataDictionary$loadLevelChunkMetaDataDictionary ()
MCAPI bool $canLaunchTasks () const
MCAPI bool $chunkPosNeedsBlending (::ChunkPos const &cp)

Static Public Member Functions

static MCAPI void ** $vftable ()
static MCAPI bool & gPerfIsClientSide ()

Public Attributes

::ll::TypedStorage< 8, 64, ::std::unordered_map<::ChunkPos, ::std::weak_ptr<::LevelChunk > > > mChunkMap
::ll::TypedStorage< 4, 4, int > mChunkSide
::ll::TypedStorage< 8, 8, ::Level * > mLevel
::ll::TypedStorage< 8, 8, ::Dimension * > mDimension
::ll::TypedStorage< 8, 8, ::ChunkSource * > mParent
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::ChunkSource > > mOwnedParent
::ll::TypedStorage< 8, 8, ::LevelChunkBuilderData * > mLevelChunkBuilderData
::ll::TypedStorage< 1, 1, ::std::atomic< bool > > mShuttingDown
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmOnSaveSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmOnLevelStorageAppSuspendSubscription
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlockmControlBlock

Member Function Documentation

◆ isChunkKnown()

virtual bool MainChunkSource::isChunkKnown ( ::ChunkPos const & chunkPos)
virtual

Reimplemented from ChunkSource.

◆ acquireDiscarded()

virtual void MainChunkSource::acquireDiscarded ( ::std::unique_ptr<::LevelChunk, ::LevelChunkFinalDeleter > ptr)
virtual

Reimplemented from ChunkSource.

◆ clearDeletedEntities()

virtual void MainChunkSource::clearDeletedEntities ( )
virtual

Reimplemented from ChunkSource.

◆ canCreateViews()

virtual bool MainChunkSource::canCreateViews ( ) const
virtual

Reimplemented from ChunkSource.

◆ setLevelChunk()

virtual void MainChunkSource::setLevelChunk ( ::std::shared_ptr<::LevelChunk > lc)
virtual

Reimplemented from ChunkSource.

◆ $vftable()

MCAPI void ** MainChunkSource::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: