Class ItemUtil

Set of utilities for working with items.

Methods

  • Find an ItemType from the given string, first trying direct then case-insensitive searching the items

    Parameters

    • expression: string

      The string expression to search for

    Returns undefined | string

    The ItemType (if found) - otherwise undefined.

  • Returns the component parts of an ItemType - the scope and the id

    E.g. @Easy/Core:wood returns ["@Easy/Core", "wood"]

    Parameters

    • itemType: string

      The item type to get the components of

    Returns [scope: string, id: string]

    The component prats of the item type string

  • Parameters

    • blockId: number

    Returns undefined | string

    Deprecated

  • Called by Core.

    Returns void