Skip to main content
Module

x/minecraft_lib/nbt/mod.ts>CompoundTag

A collection of modules that can be used to build Minecraft servers, clients, utilities and other tools.
Latest
class CompoundTag
extends Tag<Map<string, Tag>>
Re-export
import { CompoundTag } from "https://deno.land/x/minecraft_lib@0.1.0/nbt/mod.ts";

Constructors

new
CompoundTag(value?: Record<string, Tag>)
new
CompoundTag(value?: Map<string, Tag>)
new
CompoundTag(value?: Iterable<[string, Tag]>)
new
CompoundTag(value?: any)

Methods

get(key: string): Tag | undefined
getBoolean(key: string): boolean | undefined
getByte(key: string): number | undefined
getByteArray(key: string): Uint8Array | undefined
getCompoundTag(key: string): CompoundTag | undefined
getDouble(key: string): number | undefined
getFloat(key: string): number | undefined
getInt(key: string): number | undefined
getIntArray(key: string): Int32Array | undefined
getList<T extends Tag>(key: string, tagType: TagConstructor<T>): T[] | undefined
getLong(key: string): bigint | undefined
getLongArray(key: string): BigInt64Array | undefined
getShort(key: string): number | undefined
getString(key: string): string | undefined
has(key: string): boolean
set(key: string, tag: Tag): this
setBoolean(key: string, value: boolean): this
setByte(key: string, value: number): this
setByteArray(key: string, value: Uint8Array): this
setCompound(key: string, value: Record<string, Tag>): this
setCompound(key: string, value: Map<string, Tag>): this
setCompound(key: string, value: Iterable<[string, Tag]>): this
setDouble(key: string, value: number): this
setFloat(key: string, value: number): this
setInt(key: string, value: number): this
setIntArray(key: string, value: Int32Array): this
setList<T extends Tag>(key: string, value: T[]): this
setList<T extends Tag, C extends TagConstructor<T>>(
key: string,
value: TagValue<T>[],
tagType: C,
): this
setLong(key: string, value: bigint): this
setLongArray(key: string, value: BigInt64Array): this
setShort(key: string, value: number): this
setString(key: string, value: string): this