A mask for the testBlockForMatch function.

interface TestForBlockMatchMask {
    id?: modules/commands/functions/testBlockForMatch.TestForBlockMatchMaskID;
    states?: Record<string, string | number | boolean>;
}

Properties

Properties

The ID of the block, a name of a property of the block, or a string of true or false.

If not specified the mask will be ignored.

It supports the following special values:

  • isAir - The isAir property.
  • isWaterlogged - The isWaterlogged property.
  • isLiquid - The isLiquid property.
  • isSolid - The isSolid property.
  • isValid - The isValid property.
  • true - Makes the match always succeed.
  • false - Makes the match always fail.
states?: Record<string, string | number | boolean>

The states of the block.

Any states that are not included will be ignored.

If not specified only the ID will be tested.