高亮显示你附近所有匹配的方块图案。
图案可以是 1D、2D 或 3D,你可以搜索不同形状的方块组合,包括通配符(?)。
用法
配置该模组最简单的方法是使用图形界面设置屏幕。可以通过命令 /blockgrep config 启动此界面,或者前往 选项 → 控制 → 按键绑定 → Block Grep 并为其分配“打开图案设置”的按键。
在 Fabric 上,如果你安装了 Mod Menu,它将会出现在模组菜单列表中。
在设置界面中,你可以创建新图案并配置其渲染设置。
命令
你也可以完全通过命令来配置该模组。
/blockgrep pattern [symmetry] <spec> 添加任意维度的形状
/blockgrep box <x> <y> <z> <blocks> 添加一个均匀立方体
/blockgrep list 显示已保存的图案
/blockgrep toggle <n> 开启或关闭其中一个
/blockgrep only <n> 启用其中一个,禁用其余所有
/blockgrep all on|off 一次性启用或禁用所有图案
/blockgrep name <n> <text> 重命名其中一个
/blockgrep remove <n> 删除其中一个
/blockgrep radius <blocks> 4–128,默认值为 32
/blockgrep limit <count> 默认值为 512
/blockgrep config 打开设置界面
/blockgrep status
/blockgrep off
图案语法
图案由单元格谓词组成,每个谓词尝试匹配一个方块:
| 形式 |
含义 |
mud |
该方块(命名空间默认为 minecraft) |
mud,dirt |
mud 或 dirt 中的任意一种 |
mud,dirt,grass_block |
mud、dirt 或 grass_block 中的任意一种 |
#minecraft:trapdoors |
具有该标签的任何方块,即本例中的任何活板门 |
? |
任意方块,包括空气 |
!air |
除空气以外的任何方块 |
这些谓词使用 (空格)、| 和 || 组合成更大的图案。因此,
| 形式 |
含义 |
mud mud |
两个相邻的 mud 方块(东西方向) |
mud | mud |
两个相邻的 mud 方块(南北方向) |
mud mud | mud mud |
四个 mud 方块组成的 2x2 正方形 |
mud,dirt mud,dirt | mud,dirt mud,dirt |
四个 mud 或 dirt 方块组成的 2x2 正方形 |
stone stone | stone stone || mud mud | mud mud |
一个 2x2x2 的立方体,底层为 stone,顶层为 mud |
示例
维度形式
模式也可以指定为显式维度,后跟 x·y·z 个单元格,顺序为 x、然后是 z、然后是 y:
/blockgrep pattern 2 2 2 mud mud mud mud #logs ? ? #logs
对称性
默认情况下,模式会在所有四个罗盘方向上进行匹配。模式之前的可选对称规范可以更改此行为。它由最多三个轴字母组成——小写表示允许绕该轴旋转,大写或缺失表示固定——以及 h 和 v 分别用于允许水平镜像和垂直镜像。
/blockgrep pattern XYZ mud ? | ? mud 仅按书写方式匹配 (1)
/blockgrep pattern y mud ? | ? mud 四个罗盘方向旋转 (4,默认值)
/blockgrep pattern yh mud ? | ? mud ...加上水平翻转 (8)
/blockgrep pattern yv mud ? | ? mud ...加上从上到下的翻转 (8)
/blockgrep pattern yvh mud ? | ? mud 两种镜像家族 (16)
/blockgrep pattern xyz mud ? | ? mud 立方体的所有 24 种旋转
/blockgrep pattern xyzvh mud ? | ? mud 所有 48 种,包含反射
镜像平面也可以在 + 之后单独命名,依据是每个平面的法线轴:+x 是东西向翻转,+y 是上下翻转,+z 是南北向翻转。因此 yh 完全等同于 y+xz,而 yv 是 y+y。
有三点值得注意:
- 绕两个不同轴的旋转会产生绕第三个轴的旋转,因此
xy、yz、xz 和 xyz 都表示相同的 24 个方向。
- 旋转并不隐含反射。无论你怎么旋转,L 形及其镜像都是不同的形状,这就是为什么存在
h 和 v 的原因。
- 镜像之所以可以互换,是因为有旋转的存在。有了
y 的四种旋转,+x 和 +z 指向相同的八个方向;如果没有旋转,它们确实是不同的翻转,而 XYZ+xz 给出四个方向,因为组合两个镜像会产生 180° 旋转。
对称形状会去重,因此无论搜索了多少个方向,每个出现情况只报告一次。
作弊
注意:这个模组 可以 用作矿石查找器,因此应被视为某种程度的作弊。 曾考虑移除 X 射线模式以提供“轻量级”非作弊版本,但你仍然能够寻找位于 grass_block 或 stone 下方的贵重矿石,并高亮显示那些价值较低的方块,因此虽然移除 X 射线模式会限制大规模作弊,但并不会使其成为一个公平的非作弊模组。
Highlights every occurrence of a block pattern near you.
Patterns can be 1D, 2D or 3D, and you can search for shapes and groups of different
blocks, including wildcard (?)
Usage
The easiest way to configure the mod is using the GUI settings screen. This can
be started with the command /blockgrep config, or you can go to
Options → Controls → Key Binds → Block Grep and assign "Open pattern settings" a key.
On Fabric, if you have Mod Menu installed, it'll appear in the mod menu list.
In the settings screen you can create new patterns and configure their rendering
settings.
Commands
You can configure the mod entirely using commands if you wish.
/blockgrep pattern [symmetry] <spec> add a shape of any dimensions
/blockgrep box <x> <y> <z> <blocks> add a uniform box
/blockgrep list show the saved patterns
/blockgrep toggle <n> turn one on or off
/blockgrep only <n> enable one, disable the rest
/blockgrep all on|off every pattern at once
/blockgrep name <n> <text> rename one
/blockgrep remove <n> delete one
/blockgrep radius <blocks> 4–128, default 32
/blockgrep limit <count> default 512
/blockgrep config open the settings screen
/blockgrep status
/blockgrep off
Pattern syntax
Patterns are made of cell predicates, each of which tries to match a block:
| Form |
Meaning |
mud |
that block (namespace defaults to minecraft) |
mud,dirt |
Either mud or dirt |
mud,dirt,grass_block |
Either mud or dirt or a grass block |
#minecraft:trapdoors |
any block with that tag, ie. any trapdoor in this example |
? |
any block, including air |
!air |
anything the rest does not match |
These are combined into larger patterns using , | and ||. So,
| Form |
Meaning |
mud mud |
Two mud blocks beside each other (east-to-west) |
mud | mud |
Two mud blocks beside each other (north-to-south) |
mud mud | mud mud |
Four mud blocks in a 2x2 square |
mud,dirt mud,dirt | mud,dirt mud,dirt |
Four blocks of mud-or-dirt in a 2x2 square |
stone stone | stone stone || mud mud | mud mud |
A 2x2x2 cube with stone on the bottom layer and mud on the top layer |
Examples
-
A 2x2 square of mud and/or dirt:
/blockgrep box 2 1 2 mud,dirt, or
/blockgrep pattern mud,dirt mud,dirt | mud,dirt mud,dirt
-
A grass block above another grass block:
/blockgrep pattern grass_block || grass_block
-
A 2x2 of mud, with anything (or nothing) above it:
/blockgrep pattern mud mud | mud mud || ? ? | ? ?
-
Any 2x2 of logs, of any wood type:
/blockgrep pattern #logs #logs | #logs #logs
Dimensioned form
A pattern can also be given as explicit dimensions followed by x·y·z cells, in
x then z then y order:
/blockgrep pattern 2 2 2 mud mud mud mud #logs ? ? #logs
Symmetry
By default a pattern is matched at all four compass orientations. An optional
symmetry spec before the pattern changes that. It is up to three axis letters —
lowercase to allow rotation about that axis, uppercase or absent to pin it — with
h and v to allow horizontal and vertical mirroring.
/blockgrep pattern XYZ mud ? | ? mud only as written (1)
/blockgrep pattern y mud ? | ? mud four compass turns (4, the default)
/blockgrep pattern yh mud ? | ? mud ...plus horizontal flips (8)
/blockgrep pattern yv mud ? | ? mud ...plus a top-to-bottom flip (8)
/blockgrep pattern yvh mud ? | ? mud both mirror families (16)
/blockgrep pattern xyz mud ? | ? mud all 24 rotations of the cube
/blockgrep pattern xyzvh mud ? | ? mud all 48, reflections included
Mirror planes can also be named individually after a +, by the axis normal to
each: +x is the east-west flip, +y the top-to-bottom one, +z north-south.
So yh is exactly y+xz, and yv is y+y.
Three things are worth knowing:
- Rotations about two different axes generate rotations about the third, so
xy,
yz, xz and xyz all mean the same 24 orientations.
- Reflections are not implied by rotations. An L-shape and its mirror image
are different shapes however you turn them, which is why
h and v exist.
- Mirrors are only interchangeable because of rotation. With the four turns of
y in hand, +x and +z name the same eight orientations; with no rotation
at all they are genuinely different flips, and XYZ+xz gives four orientations
because composing the two mirrors produces a 180° turn.
Symmetric shapes are deduplicated, so each occurrence is reported once however
many orientations were searched.
Cheating
Note: this mod can be used as an ore-finder so it should be considered a
bit cheaty. Removing X-ray mode for a "lite" non-cheaty version was considered,
but you'd still be able to look for, say, valuable ore below a grass_block or
stone, highlighting that less-valuable block, so while removing X-ray mode
would limit bulk cheating, it wouldn't make it a fair non-cheaty mod to use.
评论 0
登录后参与评分
还没有评论,来抢沙发吧