此模组将 猪圈密码 作为新字体添加到 Minecraft 中。可用于书籍、字体、聊天消息、工具提示以及游戏中几乎所有的文本。
概述
猪圈密码是一种简单的替换密码,用于对使用英文字母的消息进行编码。

用户指南
使用密码
猪圈密码有时被称为井字棋密码。这是因为用于编码/解码字符的密钥看起来像井字棋盘。
![]()
要使用猪圈密码书写一个字符,只需将该字符替换为其周围的线条即可。例如,如果要书写字母 A,则绘制一个倒 L 形;E 则绘制为一个正方形。如果符号中包含点,则使用右侧的版本,因此内部带点的正方形代表 N。下方八个字符遵循相同的规则,T 是一个指向右方的箭头,W 是一个带有圆点的指向下方的箭头。
虽然该密码乍一看可能比较复杂,但经过一些练习后会更容易理解。
命令
如果此模组安装在 Forge 服务器上,你将能够使用一些自定义命令来帮助你使用此模组。如果安装了该模组,这些命令也可以在单人游戏中使用。
- /pigpen say - 使用密码在聊天中发布消息。所有玩家均可使用此命令。明文版本会记录在服务器控制台中。
- /pigpen hand - 使用密码重命名手持物品。仅限等级 2 的操作员(ops)。
- /pigpen book (encode|decode) - 重写手持书籍以使用密码。也可以将已编码的书籍转换为明文书籍。仅限等级 2 的操作员(ops)。
- /pigpen tile (encode|decode) <pos> - 重写方块实体(如告示牌)以使用密码。仅限等级 2 的操作员(ops)。
代码
如果你正在开发模组或拥有代码/脚本工具的访问权限,你可以通过修改组件的样式将密码应用到 ITextComponent 上。
// MCP 名称尚不可用
// func_240703_c_ = setStyle
// func_240719_a_ = setFontId
IFormattableTextComponent text = new StringTextComponent("Hello World");
text.func_240703_c_(text.getStyle().func_240719_a_(new ResourceLocation("pigpen", "pigpen")));
原版命令与 NBT
任何允许你指定文本组件的原版命令,都可以通过在文本属性中定义字体 ID 来使用密码。例如,它可以在 give 命令或 title 命令中使用。
/give @p stone{display:{Name:"[{\"text\":\"Hello\",\"italic\":false,\"color\":\"gold\",\"font\":\"pigpen:pigpen\"}]"}} 1
/title @a title {"text":"Hello","font":"pigpen:pigpen"}
This mod adds the Pig Pen Cipher to Minecraft as a new font. This can be used for books, fonts, chat messages, tooltips, and virtually any other text in the game.
Overview
The Pig Pen Cipher is a simple substitution cipher used to encode messages which use the English alphabet.

User Guide
Using the Cipher
The Pigpen Cipher is sometimes referred to as a tic-tac-toe cipher. This is because the key used to encode/decode characters looks like a tic-tac-toe board.
![]()
To write a character using the Pigpen Cipher you simply replace the character with the lines that surround the character. For example if you want to write the letter A you would draw a backwards L shape and an E would be drawn as a square. If the symbol contains a dot you would use the version on the right, so a square with a dot inside of it is an N. The eight lower characters follow the same rules, T would be an arrow pointing right and W would be an arrow pointing down with a dot in it.
While the cipher may seem complicated at first it will become a lot easier to understand with some practice.
Commands
If this mod is installed on a Forge server you will be able to use some custom commands to help you use this mod. These commands can also be used in single player if the mod is installed.
- /pigpen say - Posts a message in chat using the cipher. All players can use this command. The plaintext version is logged in the server console.
- /pigpen hand - Renames the held item with cipher. Limited to lvl 2 ops.
- /pigpen book (encode|decode) - Rewrites a held book to use cipher. Can also turn encoded books into plaintext books. Limited to lvl 2 ops.
- /pigpen tile (encode|decode) <pos> - Rewrites a tile entity such as a sign to use cipher. Limited to lvl 2 ops.
Code
If you're developing a mod or have access to code/scripting tools you can apply the cipher to an ITextComponent by modifying the style of the component.
// MCP names not yet available
// func_240703_c_ = setStyle
// func_240719_a_ = setFontId
IFormattableTextComponent text = new StringTextComponent("Hello World");
text.func_240703_c_(text.getStyle().func_240719_a_(new ResourceLocation("pigpen", "pigpen")));
Vanilla Commands & NBT
Any vanilla command which allows you to specify a text component can use cipher by defining the font ID in the text properties. For example it can be used in the give command, or in the title command.
/give @p stone{display:{Name:"[{\"text\":\"Hello\",\"italic\":false,\"color\":\"gold\",\"font\":\"pigpen:pigpen\"}]"}} 1
/title @a title {"text":"Hello","font":"pigpen:pigpen"}
下载 Pig Pen Cipher
下载 Pig Pen Cipher
下载 Pig Pen Cipher
下载 Pig Pen Cipher
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Pig Pen Cipher
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
这是 26.3 的第一个成功构建版本。你可以在这里了解更多。
本项目的实现得益于像你这样的玩家在 Patreon 上的支持!非常感谢!
- lothrazar
- techsquirrel
- Tobias Ward
- noobanidus
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧