replace_near
Replaces blocks of one type with another within a specified radius around the trigger location.
Categories: world
Required arguments
| Key(s) | Description | Type |
|---|
radius | The horizontal radius to search for blocks. Supports expressions. | EXPRESSION |
radius_y | The vertical radius to search for blocks. Supports expressions. | EXPRESSION |
replace_to | The block type to replace matching blocks with. | BLOCK |
Optional arguments
| Key(s) | Description | Type | Default |
|---|
whitelist | A list of block types that are allowed to be replaced. If omitted, all non-air blocks are eligible. | BLOCK_LIST | |
blacklist | A list of block types that should never be replaced. | BLOCK_LIST | |
duration | How long (in ticks) before the replaced blocks revert to their original type. Supports expressions. | EXPRESSION | |
disable_on_sneak | Whether to skip replacement when the player is sneaking. | BOOLEAN | false |
exposed_only | Whether to only replace blocks that have air directly above them. | BOOLEAN | false |
source_only | Whether to only replace source liquid blocks (level 0). | BOOLEAN | false |
Trigger parameters required
Example
effects:
- id: replace_near
args:
radius: 3 + %level% * 0.3
radius_y: 2 + %level% * 0.2
replace_to: <value>
whitelist: <value> # ← Optional
blacklist: <value> # ← Optional
duration: 20 * %level% # ← Optional
disable_on_sneak: true # ← Optional
exposed_only: true # ← Optional
source_only: true # ← Optional
Behaviour
| Setting | Value |
|---|
| Run order | NORMAL |
| Supports delay | true |
| Reloads on plugin reload | true |