Jump to content

Odd text color code problem


ShetiPhian

Recommended Posts

Some quick info

 

Line From Mod Localization File:

info.tank.header.msg=\u00A76-- Tank Data --

 

Line In Code: (triggered in onBlockActivated)

entityPlayer.addChatMessage(StatCollector.translateToLocal("info.tank.header.msg"));

 

 

Problem:

I've had the color code in the localization file since 1.5 and it has worked but in 1.6 it acts up only when compiled and zipped.

 

In eclipse it properly displays

"-- Tank Data --" and its orange

 

but put it into a clean Minecraft & Forge (818) install it displays

"\u00A76-- Tank Data --" and its white

 

For some reason Eclipse uses the color code, but a release environment reads it as plain text.

Link to comment
Share on other sites

Because StatCollector.translateToLocal(string) is what blocks and items used ;)

It works perfectly, except for color codes in a release environment, so I never noticed the issue while debugging.

 

Is that object array a list of approved characters?

 

after setting up a break point and stepping through the code I don't believe that will help.

 

 

Oh well, I can hard code the colors, I only had them in the localization just in case someone wanted to change them.

Link to comment
Share on other sites

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.