Pig Pen Cipher
The Pig Pen Cipher mod introduces a unique encryption system known as the "pigpen cipher" to Minecraft. This cryptographic method becomes a full-fledged font that can be applied to virtually any text in the game: books, chat messages, tooltips, and many other interface elements.
What is the Pigpen Cipher?
The pigpen cipher is a classic encryption method based on simple substitution of English alphabet characters. It's also often called the "tic-tac-toe cipher" due to the characteristic structure of the encryption key, which resembles the playing field of this popular game.

How Does Encryption Work?
The basic principle of encryption is built on replacing each letter with a specific combination of lines surrounding the corresponding position in the grid. For example, the letter A is encoded as an inverted L-shaped figure, while E is represented as a square. If the symbol contains a dot inside, the variant to the right of the main grid is used - thus, a square with a dot inside denotes the letter N.
![]()
The eight lowercase characters follow the same rules: T is denoted by an arrow pointing right, and W by an arrow pointing down with a dot inside. Although the system may seem complex at first glance, with practice it becomes intuitive.
Commands for Working with the Cipher
When the mod is installed on a Forge server, special commands become available that also work in single player:
- /pigpen say - Sends a message in chat in encrypted form. Available to all players, while the plaintext version is recorded in the server console
- /pigpen hand - Renames the held item using the cipher. Requires operator level 2 permissions
- /pigpen book (encode|decode) - Converts the book in hand to an encrypted version or back to plain text. Requires operator level 2 permissions
- /pigpen tile (encode|decode)
- Changes text on signs and other objects using the cipher. Requires operator level 2 permissions
Programming and Integration
For mod developers and users with access to programming tools, there's the possibility to apply the cipher to text components by modifying the style:
// MCP names not yet available
// func_240703c = setStyle
// func_240719a = setFontId
IFormattableTextComponent text = new StringTextComponent("Hello World");
text.func_240703c(text.getStyle().func_240719a(new ResourceLocation("pigpen", "pigpen")));
Compatibility with Vanilla Commands
Any standard Minecraft command that allows specifying text components supports using the cipher by indicating the font identifier in the text properties. For example:
/give @p stone{display:{Name:"[{\"text\":\"Hello\",\"italic\":false,\"color\":\"gold\",\"font\":\"pigpen:pigpen\"}]"}} 1
/title @a title {"text":"Hello","font":"pigpen:pigpen"}