跳转至

遮罩系统

遮罩(Mask)用于限制 WorldEdit 操作只影响特定方块。

基本遮罩

//set stone -h grass_block    — 只在草方块上放置石头
//replace #existing[air] dirt — 只替换空气方块为泥土

遮罩类型

遮罩 说明
#existing 只匹配现有方块(非空气)
#air 只匹配空气
#solid 只匹配实体方块
#surface 只匹配暴露在空气中的方块
#tree 只匹配树木方块
#leaves 只匹配树叶

方块遮罩

stone              — 匹配石头
!stone             — 匹配非石头
stone,dirt         — 匹配石头或泥土
>stone             — 匹配石头上方的方块

组合遮罩

#existing&stone    — 匹配现有石头
air|water          — 匹配空气或水

表达式遮罩

=height>64         — 匹配高度大于 64 的方块