Options
All
  • Public
  • Public/Protected
  • All
Menu

List tags represent NBT map-like data structure (key-value pairs). Its values may be of any type, so check the type before calling the appropriate getter

Hierarchy

  • CompoundTag

Index

Constructors

Methods

  • clear(): void
  • contains(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

    true if specified key exists in compound tag

  • containsValueOfType(key: string, type: number): boolean
  • Parameters

    • key: string

      key to verify for the type

    • type: number

      tag type to verify for, one of the Native.NbtDataType constants

    Returns boolean

    true if specified key exists in compound tag and its value is of specified type

  • getAllKeys(): Array<string>
  • getByte(key: string): number
  • Parameters

    • key: string

    Returns CompoundTag

    directly editable NBT tag of byte type by its key. Don't save reference for future usage since they get destroyed when the parent object is destroyed

  • getDouble(key: string): number
  • getFloat(key: string): number
  • getInt(key: string): number
  • Parameters

    • key: string

    Returns number

    NBT tag of 32-bit integer type by its key

  • getInt64(key: string): number
  • Parameters

    • key: string

    Returns number

    NBT tag of 64-bit integer type by its key

  • getListTagNoClone(key: string): ListTag
  • Parameters

    • key: string

    Returns ListTag

    directly editable NBT tag of byte type by its key. Don't save reference for future usage since they get destroyed when the parent object is destroyed

  • getShort(key: string): number
  • getString(key: string): string
  • getValueType(key: string): number
  • putByte(key: string, value: number): void
  • Puts value of byte type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putDouble(key: string, value: number): void
  • Puts value of double type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putFloat(key: string, value: number): void
  • Puts value of float type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putInt(key: string, value: number): void
  • Puts value of 32-bit integer type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putInt64(key: string, value: number): void
  • Puts value of 64-bit integer type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putListTag(key: string, value: ListTag): void
  • putShort(key: string, value: number): void
  • Puts value of short type into compound tag

    Parameters

    • key: string
    • value: number

    Returns void

  • putString(key: string, value: string): void
  • Puts value of string type into compound tag

    Parameters

    • key: string
    • value: string

    Returns void

  • remove(key: string): void
  • toScriptable(): {}
  • Converts compound tag to JavaScript object for easier reading

    Returns {}

    valid JavaScript representation of compound tag

    • [key: string]: any

Generated using TypeDoc