密碼門鎖是一種紅石電路。它們通常具有許多組件,必須以正確的組合設定以啟動諸如門之類的東西。密碼門在建立冒險地圖時非常有用。請注意,如果您正在玩生存多人遊戲,其他玩家仍然可以利用該機制並在不知道密碼的情況下啟動它。
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 上觀看) |
|---|
物品展示框鎖
物品展示框 combination locks are a step up in complexity from lever locks. 物品s in item frames can be rotated into 8 different positions. This rotation can be detected by a 紅石比較器 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 紅石火把 and leave a 紅石中繼器 connected to the comparator.
| 教學影片(在 YouTube 上觀看) |
|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||












