Skip to content

Enhancement: Support combining block tags (##) and block IDs in //replace masks #2958

@DereC4

Description

@DereC4

The Problem

Currently, combining block tags (like ##stone_ore_replaceables) with standard block IDs (like dirt) in a comma-separated mask for the //replace command does not work.

When attempting to run:
//replace ##stone_ore_replaceables,dirt air
or
//replace "##stone_ore_replaceables dirt" air

The command fails to execute properly. This makes it difficult to do bulk clean-up or replacement tasks that target a mix of specific blocks and broader block categories in a single command.

A Solution

The mask parser for //replace (and ideally other commands that accept block masks) should be updated to properly parse and combine block tags and block IDs within the same comma-separated list.

The command //replace ##stone_ore_replaceables,dirt air should effectively act as an OR mask, replacing a block if it belongs to the ##stone_ore_replaceables tag OR if it is dirt.

I tried doing the version with space separated " " but while the command executes, nothing happens

Image

Alternatives

Running //replace ##stone_ore_replaceables air and then a separate //replace dirt air. This is tedious, fills up the undo history, and is less performant on large regions compared to a single pass.

Interestingly, combining multiple negated tags and blocks does work when using the -m mask parameter in the paste command. For example, using //paste -ebm "!##deepslate_ore_replaceables !##stone_ore_replaceables !dirt !gravel" successfully filters out those combinations. However, using //paste just to achieve a basic replacement mask is incredibly unergonomic and confusing for standard gameplay/building.

Anything Else?

Interestingly, combining multiple negated tags and blocks does work when using the -m mask parameter in the paste command. For example, using //paste -ebm "!##deepslate_ore_replaceables !##stone_ore_replaceables !dirt !gravel" successfully filters out those combinations. However, using //paste just to achieve a basic replacement mask is incredibly unergonomic and confusing for standard gameplay/building.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:acceptedWill be fixed / added to WorldEdit, eventuallytype:feature-requestRequest for something new

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions