Hey guys, how would I make my item's name colored (I want my item colored red). I looked it up and found a result, it worked, but it added a space at the end of the name.
The code I found:
I have every file of source code from the aether mod and I added this to my mod too, but the only color I know so far is green. You ModLoader.AddName statement should look like this:
ModLoader.(NameHere, "\u00a7aNameHere");
So you just need to add \u00a7a before your blocks real name.
Edit: For a light-blue color put \u00a7b instead of \u00a7a.
For red put \u00a7c. You should kinda get the idea now, just change the last number a little bit(:
Is there a alternative way to make an item have a colored name or a way to get rid of the extra space at the end?
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
The way colored text works is simple \u00a7 is used to detect things. As seen in my tutorial there are many things you can do with this such as other characters. It can be used for items, blocks and almost any form of text you can think of. As for the OP I am not sure as to why you have an extra space at the end. Are you sure it is an extra space?
The symbol is not supported in-game. If you'd like to do it for items, you (to my knowlege) must use NBTEdit to give it a custom name, and add Alt-Key + 21 on the numpad, and this should show up: §
Then, just add the number/letter that corresponds to a color.
Rollback Post to RevisionRollBack
Eons ago, there was only void. Then came the big bang. Voxels colliding with voxels, cubes with cubes. Blocks were forming, each texture unique from the rest. That was when our universe was born.
The code I found:
Is there a alternative way to make an item have a colored name or a way to get rid of the extra space at the end?
-Nicolas Negroponte
Yes, it will work, regardless of blocks or items.
Thanks, Blueberry.
-Nicolas Negroponte
http://www.minecraftwiki.net/wiki/Formatting_codes
At the bottom.
The way colored text works is simple \u00a7 is used to detect things. As seen in my tutorial there are many things you can do with this such as other characters. It can be used for items, blocks and almost any form of text you can think of. As for the OP I am not sure as to why you have an extra space at the end. Are you sure it is an extra space?
Farewell everyone o/
Please make sure to quote my post so that I know you replied to me!
Then, just add the number/letter that corresponds to a color.
EnumChatFormatting.COLOUR + "Name"
I don't know if it works with modloader, but if not, i suggest you move to forge. It's a lot better.
Please be aware that this post is well over a year old and the original poster hasn't logged into the forums in several months.