SerenityJS
    Preparing search index...

    Class LevelDBProvider

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chunks: Map<Dimension, Map<bigint, Chunk>> = ...

    The loaded chunks in the provider.

    db: Leveldb

    The database instance for the provider.

    identifier: string = ...

    The identifier of the provider.

    path: string

    The path of the provider.

    world: World

    The world that the provider belongs to.

    identifier: string = "leveldb"

    The identifier of the provider.

    Methods

    • Write the chunk version to the database.

      Parameters

      • cx: number

        The chunk X coordinate.

      • cz: number

        The chunk Z coordinate.

      • dimension: Dimension
      • version: number

        The chunk version.

      Returns void

    • Writes a subchunk to the database.

      Parameters

      • subchunk: SubChunk

        The subchunk to write.

      • cx: number

        The chunk X coordinate.

      • cy: number

        The subchunk Y coordinate.

      • cz: number

        The chunk Z coordinate.

      • dimension: Dimension

        The dimension to write the subchunk to.

      Returns void

    • Build an actor data key for the database.

      Parameters

      • uniqueId: bigint

        The unique identifier of the actor.

      Returns Buffer

      The buffer key for the actor data

    • Build a block key for the database.

      Parameters

      • position: BlockPosition

        The block position.

      • index: number

        The dimension index.

      Returns Buffer

      The buffer key for the block

    • Build a chunk version key for the database.

      Parameters

      • cx: number

        The chunk X coordinate.

      • cz: number

        The chunk Z coordinate.

      • index: number

        The dimension index.

      Returns Buffer

      The buffer key for the chunk version

    • Build a subchunk key for the database.

      Parameters

      • cx: number

        The chunk X coordinate.

      • cy: number

        The subchunk Y coordinate.

      • cz: number

        The chunk Z coordinate.

      • index: number

        The dimension index.

      Returns Buffer

      The buffer key for the subchunk