EngineHub / EngineHub/WorldEdit

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

Open
#2,958 2 comments 0 reactions 0 assignees View on GitHub
status:accepted type:feature-request
Dominant language
Java
Stars
3.5k
Forks
960
Avg merge
6h 57m
Merged PRs (30d)
1

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.