SerenityJS
    Preparing search index...

    Hierarchy

    Implements

    Index

    Constructors

    Properties

    "[toStringTag]": string
    name: null | string

    The name of the nbt tag.

    size: number

    the number of elements in the Map.

    type: Compound = TagType.Compound

    The nbt tag type of the data type.

    "[species]": MapConstructor

    Methods

    • Returns an iterable of entries in the map.

      Returns MapIterator<[string, BaseTag]>

    • Returns void

    • Parameters

      • key: string

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

    • Returns an iterable of key, value pairs for every entry in the map.

      Returns MapIterator<[string, BaseTag]>

    • Executes a provided function once per each key/value pair in the Map, in insertion order.

      Parameters

      • callbackfn: (value: BaseTag, key: string, map: Map<string, BaseTag>) => void
      • OptionalthisArg: any

      Returns void

    • Get a nbt tag by its key.

      Type Parameters

      Parameters

      • key: string

        The key of the tag to retrieve.

      Returns undefined | T

      The tag associated with the key, or undefined if not found.

    • Parameters

      • key: string

      Returns boolean

      boolean indicating whether an element with the specified key exists or not.

    • Returns an iterable of keys in the map

      Returns MapIterator<string>

    • Set a nbt tag with a specific key.

      Type Parameters

      Parameters

      • key: string

        The key to associate with the tag.

      • value: T

        The tag to set.

      Returns this

      The current instance for method chaining.

    • Returns an iterable of values in the map

      Returns MapIterator<BaseTag>

    • Groups members of an iterable according to the return value of the passed callback.

      Type Parameters

      • K
      • T

      Parameters

      • items: Iterable<T>

        An iterable.

      • keySelector: (item: T, index: number) => K

        A callback which will be invoked for each item in items.

      Returns Map<K, T[]>

    • Write the nbt tag to the stream.

      Parameters

      • stream: BinaryStream

        The binary stream to write to.

      • value: CompoundTag

        The value of the tag to write.

      • options: ReadWriteOptions = ...

        The options for writing the tag.

      Returns void