/replaceReplace a selection from specified block(s) with a block.
Syntax
/replace <from> <to> [--regex]Parameters
fromRequiredblockTypeThe block types to replace from (comma-separated) or regex pattern
toRequiredblockTypeThe block type to replace to
--regexOptionalbooleanUse regex matching (from argument is treated as regex pattern)
Subcommands
/replace fromThe block types to replace from (comma-separated) or regex pattern
/replace toBlockThe block type to replace with
/replace regexUse regex matching (from argument is treated as regex pattern)
/replace substringSwapPerform substring replacement on block names (e.g., Stone to Granite replaces Rock_Stone with Rock_Granite)
Server Messages
fromRequiredFrom argument is required when using --substringSwap or --regex flags
invalidBlockType{arg} is not a valid BlockType
invalidRegexUnable to parse regex: {error}
successReplaced blocks matching {regex} with {replacement} in selection
noMatchingBlocksNo matching blocks: {blockType}
Related Commands
/convertprefabsConvert prefabs to the latest format
/copyCopy the contents of your selection in the world, storing them in your clipboard to paste
/cutCut the contents of your selection from the world, storing them in your clipboard to paste
/editlineDraw a line of blocks between two points
/extendfaceExtend the target face