- check_circle Functions
Published Jul 9th, 2023, 7/9/23 12:15 am
- 6,708 views, 25 today
- 955 downloads, 4 today
22
Simple Text Formatting (1.20+)
Use formatting codes in anvils and books!
A datapack by Oligo
Description
This datapack implements formatting codes for making customized text without JSON formatting! Formatting codes can be used to customize item names within anvils and text within books without the need for commands or special permissions. This makes text formatting accessible to all players regardless of gamemode or op status!
Usage
Text in books or anvils can be customized using the Ampersand sign (&) followed by any of the available formatting codes (listed below). For item names, text formatting is updated once the item is placed in the player's inventory after using the anvil. For writable books, text formatting is updated once the book is signed in the player's inventory.
This datapack offers the following formatting codes for text customization:
Formatting Rules
Credits
Datapack was written and tested by Oligo. Give credit if using for other projects.
Use formatting codes in anvils and books!
A datapack by Oligo
Description
This datapack implements formatting codes for making customized text without JSON formatting! Formatting codes can be used to customize item names within anvils and text within books without the need for commands or special permissions. This makes text formatting accessible to all players regardless of gamemode or op status!
Usage
Text in books or anvils can be customized using the Ampersand sign (&) followed by any of the available formatting codes (listed below). For item names, text formatting is updated once the item is placed in the player's inventory after using the anvil. For writable books, text formatting is updated once the book is signed in the player's inventory.
This datapack offers the following formatting codes for text customization:
Code | Name |
&0 | Black |
&1 | Dark Blue |
&2 | Dark Green |
&3 | Dark Aqua |
&4 | Dark Red |
&5 | Dark Purple |
&6 | Gold |
&7 | Gray |
&8 | Dark Gray |
&9 | Blue |
&a | Green |
&b | Aqua |
&c | Red |
&d | Light Purple |
&e | Yellow |
&f | White |
&k | Obfuscated |
&l | Bold |
&m | Strikethrough |
&n | Underline |
&o | Italic |
&r | Reset |
Formatting Rules
- Multiple formatting codes can be placed after each other to create mixed formatting (see example 1)
- Unlike Vanilla Minecraft, formatting codes do not overwrite color codes and vice versa (see example 2)
- The &r formatting code can be used to reset any currently set formatting (see example 3)
- Any ampersand character followed by an invalid code is treated as plain text (see example 4)
- Ampersand characters can be inserted into formatted text using an escape character (see example 5)
- Formatting codes count towards the character limit of item names and book text
Example | Raw String | Formatted String |
1 | &l&o&6Hello World | Hello World |
2 | &lHello &4World | Hello World |
3 | &l&6Hello &rWorld | Hello World |
4 | &4Tom & Jerry | Tom & Jerry |
5 | red\&blue | red&blue |
Credits
Datapack was written and tested by Oligo. Give credit if using for other projects.
Compatibility | Minecraft 1.20 |
Tags |
tools/tracking
5998636
119
simple-text-formatting-1-20-use-formatting-codes-in-anvils-and-books
Create an account or sign in to comment.