Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • Author

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.

Actually, I think this is due to addChatMessage(String), as it uses ChatMessageComponent system now.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.