EngineHub / EngineHub/WorldEdit

Regex-based type replacement

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

Description

### The Problem

It's hard to change the "type" of a colored block. e.g. from all `*_wool` to `*_concrete`. It's also not possible to easily "wax" all copper blocks.

### A Solution

Since all of the above problems are based on structural replacement of the type string, a nice generic solution is to allow substitution on the type string itself. For example, `s/_wool/_concrete` could be our pattern syntax to do the aforementioned wool -> concrete swap. It would be used as `//set s/_wool/_concrete`.

The copper example is a little more complicated due to the naming of it: `s/^(cut_)?copper/waxed_$1copper/`, to turn any normal copper block into a waxed variant.

### Alternatives

Split out dedicated patterns or commands for this. The problem with this is that we'd need to maintain the exact mapping, and it wouldn't allow other flexible replacements.

### Anything Else?

_No response_

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.