A block mask filter.

interface BlockMaskFilter {
    states?: { [id: string]: string | number | boolean };
    type: string;
    get raw(): string;
    get rawns(): string;
    get rawsb(): string;
}

Properties

Accessors

Properties

states?: { [id: string]: string | number | boolean }
type: string

The block ID or filter type.

Filter type examples:

Accessors

  • get raw(): string

    The raw string representation of the block mask filter, with the block states formatted as JSON.

    Returns string

    minecraft:example_block{"facing":"west","fill_level":5,"top_slot_bit":true}
    
  • get rawns(): string

    The raw string representation of the block mask filter, without the block states.

    It basically just returns the block ID or filter type.

    Returns string

    minecraft:example_block
    
  • get rawsb(): string

    The raw string representation of the block mask filter, with the blocks states formatted like vanilla block states.

    Returns string

    minecraft:example_block["facing"="west","fill_level"=5,"top_slot_bit"=true]