SerenityJS
    Preparing search index...

    Class CustomItemType

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    creativeCategory: CreativeItemCategory
    creativeGroup: string
    identifier: ItemIdentifier

    The identifier of the item type.

    isComponentBased: boolean

    Whether the item type is component based.

    network: number

    The network of the item type.

    properties: CompoundTag<unknown>

    The nbt properties definition of the item type. This contains the vanilla component definitions.

    traits: Map<string, typeof ItemTrait> = ...

    The traits that are bound to the item type. These traits are used to define custom behavior for the item type.

    version: number = 1

    The version of the item type.

    networkId: number = 20000
    types: Map<string, ItemType> = ...

    A collective registry of all item types.

    Accessors

    Methods

    • Convert the item type to a network instance.

      Parameters

      • type: ItemType

        The item type to convert.

      • stackSize: number = 1

        The stack size of the item type, default 1.

      • nbt: null | CompoundTag<unknown> = null

        The NBT of the item type, default null.

      Returns NetworkItemInstanceDescriptor