Jump to content

[1.7.2] Multi-line chats & text colour


Kinniken

Recommended Posts

Hi guys,

 

In 1.6 I used to add colours to my chat texts by adding a "\247" followed by a colour code. This enabled colouring bits of texts (i.e. a word or two in a line).

 

In 1.7 it still works, except that I can't find a way to get the colour to continue on the next line. This is my code:

 

ChatComponentText cc=new ChatComponentText(s);

Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(cc);

 

If I have a code switching the text to say blue on line one, it will work, but line two will revert to white.

 

I can do multi-line colouring, but with getChatStyle().setColor(colour), and that only works to colour the entire text as far as I can tell.

 

Anybody has some sample code of a way to do this?

 

Thanks

 

K.

Link to comment
Share on other sites

Yeah, we all have been having this problem.

 

Even for me, I can't find a fix on how to use color on a seperate line.

You can however do the color code / color enum for it, but changing the GUI scale for chat would make that color discontinue.

 

I'll check back if I ever find a fix for it, or someone finds a fix (in this subject)

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.