@ascentbv/ts-common - v1.0.199
    Preparing search index...

    Class ItemComponentRegistry

    Provides the functionality for registering custom components for items.

    Index

    Methods

    • Parameters

      • name: string

        The id that represents this custom component. Must have a namespace. This id can be specified in a item's JSON configuration under the 'minecraft:custom_components' item component.

      • itemCustomComponent: ItemCustomComponent

        The collection of event functions that will be called when the event occurs on an item using this custom component id.

      Returns void

      Registers an item custom component that can be used in item JSON configuration.

      This function can be called in early-execution mode.

      This function can throw errors.

      CustomComponentInvalidRegistryError

      minecraftcommon.EngineError

      ItemCustomComponentAlreadyRegisteredError

      ItemCustomComponentReloadNewComponentError

      ItemCustomComponentReloadNewEventError

      ItemCustomComponentReloadVersionError

      NamespaceNameError