Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fkm_nbt/mod.ts>NBTUtils

Node: https://www.npmjs.com/package/fkm-nbt Deno: https://deno.land/x/fkm_nbt
Latest
class NBTUtils
Re-export
import { NBTUtils } from "https://deno.land/x/fkm_nbt@v0.1.0/mod.ts";

Static Methods

private
hasBedrockLevelHeader(data: Uint8Array | number[]): boolean
private
hasGzipHeader(data: Uint8Array | number[]): boolean
private
readNBT(reader: BinaryReader): NBTElement
private
writeNBT(tag: NBTElement, writer: BinaryWriter): void
byId(id: number): NBTType<NBTElement>
jnbtToJSNBT(obj: JObjComp): JSObj
jnbtToJSNBT(obj: JObjList): JSObjArr
jnbtToNBT(obj: JObjComp): NBTCompound
jnbtToNBT(obj: JObjList): NBTList
jnbtToTreeView(obj: JObjComp): string
jnbtToTreeView(obj: JObjList): string
jsnbtToJNBT(obj: JSObj): JObjComp
jsnbtToJNBT(obj: JSObjArr): JObjList
jsnbtToNBT(obj: JSObj): NBTCompound
jsnbtToNBT(obj: JSObjArr): NBTList
jsnbtToTreeView(obj: JSObj): string
jsnbtToTreeView(obj: JSObjArr): string
nbtToJNBT(tag: NBTCompound): JObjComp
nbtToJNBT(tag: NBTList): JObjList
nbtToJSNBT(tag: NBTCompound): JSObj
nbtToJSNBT(tag: NBTList): JSObjArr
nbtToSNBT(
tag: NBTElement,
prettify?: boolean,
colorType?: "motd" | "ansi" | "none",
)
nbtToTreeView(tag: NBTElement)
read<T extends NBTElement = NBTCompound>(data: Uint8Array | number[], format?: Format): T
readCompressed<T extends NBTElement = NBTCompound>(data: Uint8Array | number[], format?: Format): T
snbtToJNBT(snbt: string): JObjComp | JObjList
snbtToJSNBT(snbt: string): JSObj | JSObjArr
snbtToNBT(snbt: string)
snbtToTreeView(snbt: string): string
write(
tag: NBTElement,
format?: Format,
options?: WriteOptions,
): Uint8Array
writeCompressed(
tag: NBTElement,
format?: Format,
options?: WriteOptions,
): Uint8Array