Class BlockPermutation

Contains the combination of type BlockType and properties (also sometimes called block state) which describe a block (but does not belong to a specific Block). This type was introduced as of version 1.17.10.21.

Hierarchy

  • BlockPermutation

Constructors

Methods

Constructors

Methods

  • Parameters

    • blockName: string

      An optional set of states to compare against.

    • Optional properties: Record<string, string | number | boolean>

    Returns boolean

    Remarks

    Returns a boolean whether a specified permutation matches this permutation. If states is not specified, matches checks against the set of types more broadly.

    This function can't be called in read-only mode.

  • Parameters

    • blockName: string

      Identifier of the block to check.

    • Optional properties: Record<string, string | number | boolean>

      Optional additional set of properties to check against.

    Returns BlockPermutation

    Remarks

    Given a type identifier and an optional set of properties, will return a BlockPermutation object that is usable in other block APIs (e.g., block.setPermutation)

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.