Colored Item/Block/etc. Name Text- So easy even a person could do it!
You don't normally see blocks and items from mods with colored names. The only mod I've seen with colored names is Mekanism and that prompted me to add colored names to my blocks and items. I will tell you how to do it here. This also works with resource packs.
Requirements:
Know how to make a lang file
Step one:
Create a lang file. This is basic modding and everyone should know how to do it.
Step two:
Once you have localized your unlocalized name, put the § symbol in front of the localised name (example:
tile.unlocalizedname.name=§4Desired Name
[where 4 is an example number]). Next we pick a color code. §0 is black, §1 is blue, §2 is green, §3 is dark aqua, §4 is red, §5 is purple, §6 is orange, §7 is light gray, §8 is dark gray, §9 is light blue, §a is lime green, §b is light aqua, §c is pink/light red, §d is magenta, §f is white and §e is yellow. You can also use the cool formatting codes as well. §l is bold, §m is strikethrough, §k is obfuscated (flashing random letters), §o is italic and §n is underlined. Use §r to reset everything. You can also use this system to colorize anything else that uses .lang files to localize its name (Creative tabs, items, entities etc).
Doing it in the mcmod.info file is a bit different but just as easy. Instead of using the § character, you have to use \u00A7 and then the number (\u00A71 would be blue and so on).
Do you have any Idea as to why this is? Am I saving the file wrong?
(Also, I apparently can't format comments correctly here.)
Nobody can correctly format comments here :). Have you saved the file in UTF-8 format? If not, if you're using notepad, when you go to save the file, look down at the bottom of the save as menu and you can set your encoding to UTF-8. If you're using Notepad++, click encoding on the top menu and chose Encode in UTF-8. Alternatively if this doesn't work, there is a way to do it through code so I'll write that part out shortly.
If it needs to be formatted differently using the IDE then that's probably my problem.
I tested it once using UTF-8 via notepad and it worked fine, then i modified en_US.lang in my IDE and it stopped working properly.
Well at least we know what caused the problem. If you're using Eclipse to work on your stuff, right click on the en_US.lang file in the Package Explorer, hit properties, and down where it says Text File Encoding, click the Other button and on that drop down menu you can choose UTF-8 as your formatting.
Colored Item/Block/etc. Name Text- So easy even a person could do it!
You don't normally see blocks and items from mods with colored names. The only mod I've seen with colored names is Mekanism and that prompted me to add colored names to my blocks and items. I will tell you how to do it here. This also works with resource packs.
Requirements:
Know how to make a lang file
Step one:
Create a lang file. This is basic modding and everyone should know how to do it.
Step two:
Once you have localized your unlocalized name, put the § symbol in front of the localised name (example:
The minecraft wiki explains color codes more in depth. http://minecraft.gamepedia.com/Formatting_codes
Step three:
Save your lang file encoded in UTF-8 format.
Watch it in action
Doing it in mcmod.info
Doing it in the mcmod.info file is a bit different but just as easy. Instead of using the § character, you have to use \u00A7 and then the number (\u00A71 would be blue and so on).
Hope it`s helpful! Let me know if I screwed up.
Also my mod Monoblocks which I used for this tutorial is here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
Can you perhaps give an example of the code used?
...
In your lang file, where you normally do
, let's assume you wanted the final product to be red. In that case you would replace with .Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
Here's an example of a problem I'm getting in my mod quasarcraft:
(en_US.lang)
...
Nobody can correctly format comments here :). Have you saved the file in UTF-8 format? If not, if you're using notepad, when you go to save the file, look down at the bottom of the save as menu and you can set your encoding to UTF-8. If you're using Notepad++, click encoding on the top menu and chose Encode in UTF-8. Alternatively if this doesn't work, there is a way to do it through code so I'll write that part out shortly.
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
If it needs to be formatted differently using the IDE then that's probably my problem.
I tested it once using UTF-8 via notepad and it worked fine, then i modified en_US.lang in my IDE and it stopped working properly.
...
Well at least we know what caused the problem. If you're using Eclipse to work on your stuff, right click on the en_US.lang file in the Package Explorer, hit properties, and down where it says Text File Encoding, click the Other button and on that drop down menu you can choose UTF-8 as your formatting.
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
What do I do if I'm using IntelliJ IDEA?
...
I have no clue since I don't use it. Sorry.
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
Oh, okay.
It's probably somewhere on the internet...
...
The answer will probably show up if you Google something like "how to change encoding of files in intellij idea".
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
yeah.
thank you for the help, by the way.
...
You're welcome. Good luck on your mod!
Monoblocks and Vehicular Movement: The greatest additions to a modern Minecraft city. Grab them here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2236322-goldensilver853s-mod-hub
You are now breathing manually.
Thank you!
...