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

x/fkm_nbt/nbt/NBTHelper.ts>NBTHelper

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

Constructors

new
private
NBTHelper()

Static Methods

private
writeNBT(element: NBTElement, writer: BinaryWriter): void
byId(id: number): NBTType<NBTElement>
deprecated
getById(id: number)
jnbtToNBT<T = NBTElement>(obj: JObj): T
jsnbtToNBT<T = NBTElement>(json: any): T
nbtToSNBT(
prettify?: boolean,
colorType?: "motd" | "ansi" | "none",
)
read<T = NBTCompound>(data: Uint8Array): T
readCompressed<T = NBTCompound>(data: Uint8Array): T
snbtToNBT(text: string): NBTCompound
write(
element: NBTElement,
littleEndian?: boolean,
bedrockHeader?: boolean,
): Uint8Array
writeCompressed(
element: NBTElement,
littleEndian?: boolean,
bedrockHeader?: boolean,
): Uint8Array