Jump to content

Recommended Posts

Posted

Hello again Forums, new problem this time, Since Minecraft implemented Colored names using formatting codes §0 and §6 for colors like black and gold. I tried to implement this into the code I am currently working with, but to my avail the game only recognizes 2/4 of the items and makes only 2/4 gold.

 

Language Registry section of code, all other parts such as making class for each tool has been done properly, along with the EnumTool and item registration

 

        @Init
        public void load(FMLInitializationEvent event) {
                proxy.registerRenderers();
                //Register New Blocks and Items
                LanguageRegistry.addName(netherSword, "§6Nether Sword");
                LanguageRegistry.addName(netherPickaxe, "§6Nether Pickaxe");
                LanguageRegistry.addName(netherSpade, "§6Nether Spade");
                LanguageRegistry.addName(netherAxe, "§6Nether Axe");    

 

 

Pictures of problem

 

 

problems.png

 

 

 

IF you need to see any other parts of the code or can help please respond, Thank you

Posted

Here is how to use colors for item names and block names, and well anything really!

 

Firstly, in your add name method (LanguageRegistry.addName(par1, par2), before your item name, you want to put:

 

\u00a7a

 

However, this will give you bright green, to change the color, replace the last letter (the a) with one of these letters OR numbers:

 

0 - Black

1 - Dark Blue

2 - Dark Green

3 - Dark Aqua

4 - Dark Red

5 - Purple

6 - Orange (Gold)

7 - Gray

8 - Dark Gray

9 - Indigo

a - Bright Green

b - Aqua

c - Red

d - Pink

e - Yellow

f - White

 

source - http://www.minecraftforum.net/topic/1764612-151-mads-forge-modding-tutorials-wip/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.