Creates a new block pattern.
The entries for the block pattern.
Optionaltype: "random" | "sequence" = "random"The type of the block pattern.
A new block pattern.
The entries for the block pattern.
The type of the block pattern.
"random" will make it generate the block pattern in a random order and will use the weights to determine the chance of each block pattern entry being selected.
"sequence" will make it generate the block pattern in a sequence and will use the weights to determine the number of times each block pattern entry will be repeated.
Gets a block pattern entry.
OptionalgenerateIndex: number | bigint = 0The current index of the generation. This is used to determine which block pattern entry to get if the type is "sequence".
OptionalforceMode: "random" | "sequence"The type of the block pattern. If specified, it will override the type property of the block pattern.
The block pattern entry.
Gets a block permutation from a block pattern entry.
OptionalgenerateIndex: number | bigint = 0The current index of the generation. This is used to determine which block pattern entry to get if the type is "sequence".
OptionalforceMode: "random" | "sequence"The type of the block pattern. If specified, it will override the type property of the block pattern.
The block permutation.
Pushes a block pattern entry to the block pattern.
The entries to push to the block pattern.
The new amount of entries in the block pattern.
Converts the block pattern to a string.
It returns the same value as BlockPattern.prototype.raw.
The raw string representation of the block pattern.
StaticextractExtracts a block pattern from a string.
The string to extract the block pattern from.
Optionalmode: "random" | "sequence"The type of the block pattern. If not provided, the mode will be determined based on the string.
The block pattern extracted from the string.
StaticextractExtracts all block patterns from a string.
The string to extract the block patterns from.
Optionalmode: "random" | "sequence"The type of the block patterns. If not provided, the mode will be determined based on the string.
The block patterns extracted from the string.
StaticextractExtracts all raw block patterns from a string.
The string to extract the raw block patterns from.
The raw block patterns, or null if no raw block patterns were found.
StaticextractExtracts all raw block patterns from a string and returns the raw strings and the parsed block patterns.
The string to extract the raw block patterns from.
Optionalmode: "random" | "sequence"The type of the block patterns. If not provided, the mode will be determined based on the string. Only applies to the block patterns, the raw strings are not affected.
The raw strings and the parsed block patterns. Only applies to the block patterns, the raw strings are not affected.
StaticextractExtracts a raw block pattern from a string.
The string to extract the raw block pattern from.
The raw block pattern, or null if no raw block pattern was found.
StaticextractWRawExtracts a block pattern from a string and returns the raw string and the parsed block pattern.
The string to extract the block pattern from.
Optionalmode: "random" | "sequence"The type of the block pattern. If not provided, the mode will be determined based on the string. Only Only applies to the block pattern, the raw string is not affected.
The raw string and the parsed block pattern. Only applies to the block pattern, the raw string is not affected.
Staticparse
A class that represents a block pattern.
Block patterns are used to generate blocks in a world.
Many things use them, such as many of the WorldEdit commands.