密码门锁是一种红石电路。它们通常具有许多组件,必须以正确的组合设置以激活诸如门之类的东西。密码门在创建冒险地图时非常有用。请注意,如果您正在玩生存多人游戏,其他玩家仍然可以利用该机制并在不知道密码的情况下激活它。
Order-insensitive combination locks
拉杆锁
拉杆锁是最容易建造的红石锁之一。每个拉杆能使锁具的组合数量增加一倍。可以使用2^n找到可能性,其中n是使用的杠杆数。
在建造时,您可能首先要放置杠杆并将它们放入所需的位置。接下来,您应该放置红石火把和中继器。火把置于杠杆下方,而中继器则置于杠杆后方。完成后,应关闭所有火把和中继器。如果没有,请仔细检查所有打开的组件。
- 步骤1
首先把11个实体方块排成一排。然后添加8个实体方块各成一排至两侧。然后在第一个上面增加一行实体方块
- 步骤2
在第一行放一个拉杆,接着在第二行上面放告示牌,每一个带有数字(1、2、3……9)
- 步骤3
然后,在拉杆的前面给每个方块放红石中继器。
- 步骤4
根据你想要的密码(图中使用的例子为1,2,6)在你想要的密码后方放一个实体方块,上面放一个红石火把。
- 步骤5
在密码后方的实体方块,再放一个实体方块,接着,把所有的空气方块以红石中继器填满。
- 步骤6
放置红石粉如图所示:
- 步骤7
放一条红石线路,从中间往后连到倒数第二行方块,在最后一格放上一个实体方块。
- 步骤8
在刚才放置的实体方块上放一个红石火把,接着再放一个实体方块,最后再放一个木门或铁门。(小心,如果你想在PVP服务器上用这种方式保护你的物品,则可能会有人会通过仅仅放置一个按钮就可以破坏整个装置的作用!)
- 步骤9
你完成了! 再来你只要拉下你所设定的密码的拉杆,门就会自动打开了!
- 步骤10
用建造密码门的实体方块做一个屋顶。
- Notes
The design shown in these directions can have up to 29 inputs. Larger amounts are more secure; the number of possibilities is 2^c, where c is the number of levers used. You can't have more than 29 inputs with this design as the redstone signal won't travel far enough.
演示视频(在 YouTube 上观看) |
---|
物品展示框锁
Item frame combination locks are a step up in complexity from lever locks. Items in item frames can be rotated into 8 different positions. This rotation can be detected by a comparator which will output a signal strength from 1 to 8 depending on the position. Since each item frame has 8 possible states, the number of possible combinations can be found with 8 ^ n, where n is the number of item frames.
If you want to make it extra tricky, it is also possible to detect an empty item frame by when a comparator doesn't output anything. Simply omit the redstone torch and leave a repeater connected to the comparator.
教程视频(在 YouTube 上观看) |
---|
|