Minecraft Data Packs / Game Mechanic

[OBSOLETE] Format Text in Anvils! [1.19+]

  • check_circle Advancements
  • check_circle Functions
  • 6,788 views, 5 today
  • 970 downloads, 0 today
  • 39
  • 35
  • 12
Oligo's Avatar Oligo
Level 37 : Artisan Crafter
22

NOTE: Updates to this datapack are no longer being tracked on this page. For an expanded version of this datapack with more features for 1.20+ see the page [​HERE]


Anvil Formatting Codes


a Minecraft Datapack for versions 1.19 and higher


Description:

Allows formatting of item names in anvils using formatting codes! This provides a survival-friendly method for all players to get customized item names.


Usage:

Custom text can be used when renaming items in anvils using the Ampersand sign (&) followed by a valid formatting code:
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

Multiple formatting codes can be specified consecutively to customize text color and type (see Example 1). Unlike default Minecraft, all previous formatting types are retained throughout text (see Example 2). Consequently, formatting can be reset to default parameters using the &r code (see Example 3).

Text Entered in Anvil
Text Produced
&d&lHello World
Hello World
&nHello &dWorld
Hello World
&d&l&nHello &r&dWorld
Hello World


NOTES:
  • Text interpretation occurs when the item is moved into the player's inventory. Interpretation can take multiple ticks to multiple seconds depending on server backup!
  • Italic formatting on renamed items is removed by default! This replicates the functionality of Unitalicize, however, both datapacks should NOT be running in the same world
The datapack can be fully disabled by using the command /function afc:uninstall

Credits:
This datapack utilizes 5uso's General String Parser for converting raw strings to character arrays. String parsing, interpreting, and data handling written by Oligo
.
CompatibilityMinecraft 1.19
Tags

Create an account or sign in to comment.

1
07/06/2023 7:28 pm
Level 3 : Apprentice Explorer
Konah_
Konah_'s Avatar
So, does this actually work? Tried it, nothing happened :/
1
06/29/2023 1:35 pm
Level 1 : New Miner
nezcal
nezcal's Avatar
Any plans to update this to 1.20? Datapack doesn't work as-is.
2
01/22/2023 10:06 am
Level 1 : New Miner
Nopa3
Nopa3's Avatar
It doesn't work for me i installed the pack and put it in the datapack folder and when i want to color something nothing happens
2
01/20/2023 3:41 am
Level 1 : New Miner
australias
australias's Avatar
it seems it doesn't work for me in 1.19.3. it's in the enabled datapacks list but when I take a named item out of an anvil not only is it not formatted but it's still italicized.
1
01/19/2023 12:58 pm
Level 39 : Artisan Miner
Lordphenex
Lordphenex's Avatar
1.19.4 will make your work so much simpler !
2
01/19/2023 2:56 pm
Level 37 : Artisan Crafter
Oligo
Oligo's Avatar
You are correct! Once 1.19.4 officially releases, I will remove the dependancy on 5uso's string parser. Should run much faster afterwards too!
1
07/01/2023 4:07 am
Level 1 : New Explorer
shirocraftyt
shirocraftyt's Avatar
does 1.19.4 codes also works for 1.20?
1
01/19/2023 5:16 amhistory
Level 19 : Journeyman Cow
stonesite10
stonesite10's Avatar
I always wanted this, it's so usefull
1
01/16/2023 3:43 pm
Level 3 : Apprentice Explorer
MiziraBuildz
MiziraBuildz's Avatar
Does this datapack also have the functions of the remove italics datapack of yours? Or would I need both?
2
01/16/2023 6:05 pm
Level 37 : Artisan Crafter
Oligo
Oligo's Avatar
Yes, this datapack incorporates unitalicizing names by default without the "Unitalicize" datapack! I would NOT recommend having both datapacks running in the same world.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome