SerenityJS
    Preparing search index...

    Since v2168, an ingredient is a variant: index 0 is an empty descriptor, and index 1 is a named descriptor ("name", "molang" or "item_tag") followed by its payload. Items are referenced by name; the network id ("Default") and alias descriptors no longer exist on the wire. Name descriptors are read as InternalType.Deferred.

    Hierarchy

    • DataType
      • RecipeIngredient
    Index

    Constructors

    Properties

    definition: null | RecipeIngredientType

    The the ingredient item definition based on the type.

    stackSize: number

    The stack size of the ingredient

    The type of the ingredient.

    Methods

    • Reads an ingredient as it is written in item stack requests. Unlike recipes, the descriptor variant index is the descriptor type (empty, name, molang, item tag), followed by the legacy type byte and the payload, and the stack size is a uint16.

      Parameters

      • stream: BinaryStream

        The stream to read from.

      Returns RecipeIngredient

      The ingredient.