A block pattern entry.

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

Properties

Accessors

Properties

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

The block ID or pattern type.

weight?: number

The weight of the block pattern entry.

This is used to determine the chance of the block pattern entry being selected.

Increasing this value is like putting this entry in the pattern the specified number of times.

If this is used while in sequence mode, then it will just repeat this entry the specified number of times.

1

Accessors

  • get raw(): string

    The raw string representation of the block pattern entry, with the block states formatted as JSON.

    Returns string

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

    The raw string representation of the block pattern entry, without the block states.

    Returns string

    minecraft:example_block%36
    
  • get rawsb(): string

    The raw string representation of the block pattern entry, with the blocks states formatted like vanilla block states.

    Returns string

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

    v1.33.1-preview.20+BUILD.1