/replace
building

Replace a selection from specified block(s) with a block.

Syntax

/replace <from> <to> [--regex]
RequiredOptional

Parameters

fromRequiredblockType

The block types to replace from (comma-separated) or regex pattern

toRequiredblockType

The block type to replace to

--regexOptionalboolean

Use regex matching (from argument is treated as regex pattern)

Subcommands

/replace from

The block types to replace from (comma-separated) or regex pattern

/replace toBlock

The block type to replace with

/replace regex

Use regex matching (from argument is treated as regex pattern)

/replace substringSwap

Perform substring replacement on block names (e.g., Stone to Granite replaces Rock_Stone with Rock_Granite)

Server Messages

fromRequired

From argument is required when using --substringSwap or --regex flags

invalidBlockType

{arg} is not a valid BlockType

invalidRegex

Unable to parse regex: {error}

success

Replaced blocks matching {regex} with {replacement} in selection

noMatchingBlocks

No matching blocks: {blockType}