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

x/fkm_nbt/nbt/NBTUtils.ts>NBTUtils

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

Static Methods

private
hasBedrockLevelHeader(data: Uint8Array | number[]): boolean
private
hasGzipHeader(data: Uint8Array | number[]): boolean
private
writeNBT(tag: NBTElement, writer: BinaryWriter): void
byId(id: number): NBTType<NBTElement>
jnbtToTreeView(obj: JObjComp): string
jnbtToTreeView(obj: JObjList): string
jsnbtToTreeView(obj: JSObj): string
nbtToSNBT(
prettify?: boolean,
colorType?: "motd" | "ansi" | "none",
)
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(
format?: Format,
options?: WriteOptions,
): Uint8Array
writeCompressed(
format?: Format,
options?: WriteOptions,
): Uint8Array