Function getKeysOfTypes

  • Gets the keys from the LevelDB with one of the specified content types.

    Type Parameters

    • T extends
          | readonly (
              | "Data3D"
              | "Version"
              | "Data2D"
              | "Data2DLegacy"
              | "SubChunkPrefix"
              | "LegacyTerrain"
              | "BlockEntity"
              | "Entity"
              | "PendingTicks"
              | "LegacyBlockExtraData"
              | "BiomeState"
              | "FinalizedState"
              | "ConversionData"
              | "BorderBlocks"
              | "HardcodedSpawners"
              | "RandomTicks"
              | "Checksums"
              | "GenerationSeed"
              | "GeneratedPreCavesAndCliffsBlending"
              | "BlendingBiomeHeight"
              | "MetaDataHash"
              | "BlendingData"
              | "ActorDigestVersion"
              | "LegacyVersion"
              | "AABBVolumes"
              | "VillageDwellers"
              | "VillageInfo"
              | "VillagePOI"
              | "VillagePlayers"
              | "VillageRaid"
              | "Player"
              | "PlayerClient"
              | "ActorPrefix"
              | "ChunkLoadedRequest"
              | "Digest"
              | "Map"
              | "Portals"
              | "SchedulerWT"
              | "StructureTemplate"
              | "TickingArea"
              | "FlatWorldLayers"
              | "LegacyOverworld"
              | "LegacyNether"
              | "LegacyTheEnd"
              | "MVillages"
              | "Villages"
              | "LevelSpawnWasFixed"
              | "PositionTrackingDB"
              | "PositionTrackingLastId"
              | "Scoreboard"
              | "Overworld"
              | "Nether"
              | "TheEnd"
              | "AutonomousEntities"
              | "BiomeData"
              | "BiomeIdsTable"
              | "MobEvents"
              | "DynamicProperties"
              | "LevelChunkMetaDataDictionary"
              | "RealmsStoriesData"
              | "LevelDat"
              | "ForcedWorldCorruption"
              | "Unknown"
          )[]
          | (
              | "Data3D"
              | "Version"
              | "Data2D"
              | "Data2DLegacy"
              | "SubChunkPrefix"
              | "LegacyTerrain"
              | "BlockEntity"
              | "Entity"
              | "PendingTicks"
              | "LegacyBlockExtraData"
              | "BiomeState"
              | "FinalizedState"
              | "ConversionData"
              | "BorderBlocks"
              | "HardcodedSpawners"
              | "RandomTicks"
              | "Checksums"
              | "GenerationSeed"
              | "GeneratedPreCavesAndCliffsBlending"
              | "BlendingBiomeHeight"
              | "MetaDataHash"
              | "BlendingData"
              | "ActorDigestVersion"
              | "LegacyVersion"
              | "AABBVolumes"
              | "VillageDwellers"
              | "VillageInfo"
              | "VillagePOI"
              | "VillagePlayers"
              | "VillageRaid"
              | "Player"
              | "PlayerClient"
              | "ActorPrefix"
              | "ChunkLoadedRequest"
              | "Digest"
              | "Map"
              | "Portals"
              | "SchedulerWT"
              | "StructureTemplate"
              | "TickingArea"
              | "FlatWorldLayers"
              | "LegacyOverworld"
              | "LegacyNether"
              | "LegacyTheEnd"
              | "MVillages"
              | "Villages"
              | "LevelSpawnWasFixed"
              | "PositionTrackingDB"
              | "PositionTrackingLastId"
              | "Scoreboard"
              | "Overworld"
              | "Nether"
              | "TheEnd"
              | "AutonomousEntities"
              | "BiomeData"
              | "BiomeIdsTable"
              | "MobEvents"
              | "DynamicProperties"
              | "LevelChunkMetaDataDictionary"
              | "RealmsStoriesData"
              | "LevelDat"
              | "ForcedWorldCorruption"
              | "Unknown"
          )[]

      The content types to look for.

    Parameters

    Returns Promise<
        {
            [key in | "Data3D"
            | "Version"
            | "Data2D"
            | "Data2DLegacy"
            | "SubChunkPrefix"
            | "LegacyTerrain"
            | "BlockEntity"
            | "Entity"
            | "PendingTicks"
            | "LegacyBlockExtraData"
            | "BiomeState"
            | "FinalizedState"
            | "ConversionData"
            | "BorderBlocks"
            | "HardcodedSpawners"
            | "RandomTicks"
            | "Checksums"
            | "GenerationSeed"
            | "GeneratedPreCavesAndCliffsBlending"
            | "BlendingBiomeHeight"
            | "MetaDataHash"
            | "BlendingData"
            | "ActorDigestVersion"
            | "LegacyVersion"
            | "AABBVolumes"
            | "VillageDwellers"
            | "VillageInfo"
            | "VillagePOI"
            | "VillagePlayers"
            | "VillageRaid"
            | "Player"
            | "PlayerClient"
            | "ActorPrefix"
            | "ChunkLoadedRequest"
            | "Digest"
            | "Map"
            | "Portals"
            | "SchedulerWT"
            | "StructureTemplate"
            | "TickingArea"
            | "FlatWorldLayers"
            | "LegacyOverworld"
            | "LegacyNether"
            | "LegacyTheEnd"
            | "MVillages"
            | "Villages"
            | "LevelSpawnWasFixed"
            | "PositionTrackingDB"
            | "PositionTrackingLastId"
            | "Scoreboard"
            | "Overworld"
            | "Nether"
            | "TheEnd"
            | "AutonomousEntities"
            | "BiomeData"
            | "BiomeIdsTable"
            | "MobEvents"
            | "DynamicProperties"
            | "LevelChunkMetaDataDictionary"
            | "RealmsStoriesData"
            | "LevelDat"
            | "ForcedWorldCorruption"
            | "Unknown"]: Buffer<ArrayBuffer>[]
        },
    >

    An object mapping each of the specified content types to the keys from the LevelDB with that content type, the keys are in Buffer format, this is because some keys contain binary data like chunk indices.

  • Gets the keys from the list of LevelDB keys with one of the specified content types.

    Type Parameters

    • T extends
          | readonly (
              | "Data3D"
              | "Version"
              | "Data2D"
              | "Data2DLegacy"
              | "SubChunkPrefix"
              | "LegacyTerrain"
              | "BlockEntity"
              | "Entity"
              | "PendingTicks"
              | "LegacyBlockExtraData"
              | "BiomeState"
              | "FinalizedState"
              | "ConversionData"
              | "BorderBlocks"
              | "HardcodedSpawners"
              | "RandomTicks"
              | "Checksums"
              | "GenerationSeed"
              | "GeneratedPreCavesAndCliffsBlending"
              | "BlendingBiomeHeight"
              | "MetaDataHash"
              | "BlendingData"
              | "ActorDigestVersion"
              | "LegacyVersion"
              | "AABBVolumes"
              | "VillageDwellers"
              | "VillageInfo"
              | "VillagePOI"
              | "VillagePlayers"
              | "VillageRaid"
              | "Player"
              | "PlayerClient"
              | "ActorPrefix"
              | "ChunkLoadedRequest"
              | "Digest"
              | "Map"
              | "Portals"
              | "SchedulerWT"
              | "StructureTemplate"
              | "TickingArea"
              | "FlatWorldLayers"
              | "LegacyOverworld"
              | "LegacyNether"
              | "LegacyTheEnd"
              | "MVillages"
              | "Villages"
              | "LevelSpawnWasFixed"
              | "PositionTrackingDB"
              | "PositionTrackingLastId"
              | "Scoreboard"
              | "Overworld"
              | "Nether"
              | "TheEnd"
              | "AutonomousEntities"
              | "BiomeData"
              | "BiomeIdsTable"
              | "MobEvents"
              | "DynamicProperties"
              | "LevelChunkMetaDataDictionary"
              | "RealmsStoriesData"
              | "LevelDat"
              | "ForcedWorldCorruption"
              | "Unknown"
          )[]
          | (
              | "Data3D"
              | "Version"
              | "Data2D"
              | "Data2DLegacy"
              | "SubChunkPrefix"
              | "LegacyTerrain"
              | "BlockEntity"
              | "Entity"
              | "PendingTicks"
              | "LegacyBlockExtraData"
              | "BiomeState"
              | "FinalizedState"
              | "ConversionData"
              | "BorderBlocks"
              | "HardcodedSpawners"
              | "RandomTicks"
              | "Checksums"
              | "GenerationSeed"
              | "GeneratedPreCavesAndCliffsBlending"
              | "BlendingBiomeHeight"
              | "MetaDataHash"
              | "BlendingData"
              | "ActorDigestVersion"
              | "LegacyVersion"
              | "AABBVolumes"
              | "VillageDwellers"
              | "VillageInfo"
              | "VillagePOI"
              | "VillagePlayers"
              | "VillageRaid"
              | "Player"
              | "PlayerClient"
              | "ActorPrefix"
              | "ChunkLoadedRequest"
              | "Digest"
              | "Map"
              | "Portals"
              | "SchedulerWT"
              | "StructureTemplate"
              | "TickingArea"
              | "FlatWorldLayers"
              | "LegacyOverworld"
              | "LegacyNether"
              | "LegacyTheEnd"
              | "MVillages"
              | "Villages"
              | "LevelSpawnWasFixed"
              | "PositionTrackingDB"
              | "PositionTrackingLastId"
              | "Scoreboard"
              | "Overworld"
              | "Nether"
              | "TheEnd"
              | "AutonomousEntities"
              | "BiomeData"
              | "BiomeIdsTable"
              | "MobEvents"
              | "DynamicProperties"
              | "LevelChunkMetaDataDictionary"
              | "RealmsStoriesData"
              | "LevelDat"
              | "ForcedWorldCorruption"
              | "Unknown"
          )[]

      The content types to look for.

    • TArrayBuffer extends ArrayBufferLike

      The type of the buffers.

    Parameters

    Returns {
        [key in
            | "Data3D"
            | "Version"
            | "Data2D"
            | "Data2DLegacy"
            | "SubChunkPrefix"
            | "LegacyTerrain"
            | "BlockEntity"
            | "Entity"
            | "PendingTicks"
            | "LegacyBlockExtraData"
            | "BiomeState"
            | "FinalizedState"
            | "ConversionData"
            | "BorderBlocks"
            | "HardcodedSpawners"
            | "RandomTicks"
            | "Checksums"
            | "GenerationSeed"
            | "GeneratedPreCavesAndCliffsBlending"
            | "BlendingBiomeHeight"
            | "MetaDataHash"
            | "BlendingData"
            | "ActorDigestVersion"
            | "LegacyVersion"
            | "AABBVolumes"
            | "VillageDwellers"
            | "VillageInfo"
            | "VillagePOI"
            | "VillagePlayers"
            | "VillageRaid"
            | "Player"
            | "PlayerClient"
            | "ActorPrefix"
            | "ChunkLoadedRequest"
            | "Digest"
            | "Map"
            | "Portals"
            | "SchedulerWT"
            | "StructureTemplate"
            | "TickingArea"
            | "FlatWorldLayers"
            | "LegacyOverworld"
            | "LegacyNether"
            | "LegacyTheEnd"
            | "MVillages"
            | "Villages"
            | "LevelSpawnWasFixed"
            | "PositionTrackingDB"
            | "PositionTrackingLastId"
            | "Scoreboard"
            | "Overworld"
            | "Nether"
            | "TheEnd"
            | "AutonomousEntities"
            | "BiomeData"
            | "BiomeIdsTable"
            | "MobEvents"
            | "DynamicProperties"
            | "LevelChunkMetaDataDictionary"
            | "RealmsStoriesData"
            | "LevelDat"
            | "ForcedWorldCorruption"
            | "Unknown"]: Buffer<TArrayBuffer>[]
    }

    An object mapping each of the specified content types to the keys from the provided LevelDB keys array with that content type, the keys are in Buffer format, this is because some keys contain binary data like chunk indices.