No color, boldness, italic and underlined please add

Started by TTrixPlays on

Topic category: Advanced modding

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
No color, boldness, italic and underlined please add

I made it when i type /test in chat it comes up with test but i want it to come up with dark red, bold, italic and underlined does anyone know how to do that it would be lovely here is the code on it.

 

var1.sendMessage(new TextComponentString("Test!"));   if (true) { System.out.println("&aCommands Working!");   Can someone just add the color and other things please :)
Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
You just need to use
Sun, 08/20/2017 - 00:39

You just need to use TextFormatting

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
Can you please edit it
Sun, 08/20/2017 - 00:43

Can you please edit it because I don't know how to do that

 

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
Do i use &, % or the weird s
Sun, 08/20/2017 - 00:59

Do i use &, % or the weird s

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Just use TextFormatting
Sun, 08/20/2017 - 00:59

Just use TextFormatting.FORMATING+YOUR_TEXT , for example, TextFormatting.RED+"I am a pretty red text!"
Also, you can not parse the formatting to System.out PrintStream (Ok, technically you can, but is quite hacky, probably working only under specific conditions, and also practically you have not any reason to do so as end-user will not have some specific reason to look for it) 

Active 6 years ago
Joined Jul 2016
Points:
738

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
Use the wierd S.
Sun, 08/20/2017 - 01:01

Use the wierd S.

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I'm bad at this
Sun, 08/20/2017 - 01:11

I'm bad at this

C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_test.java:100: error: not a statement
         TextFormatting.RED+"I am a pretty red text!"
                           ^
C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_test.java:100: error: ';' expected
         TextFormatting.RED+"I am a pretty red text!"

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Next time please post your
Sun, 08/20/2017 - 01:26

Next time please post your code (and by that I mean to post it somewhere on pastebin with correct syntax highlight).
However, I guess you have just written TextFormatting.RED+"I am a pretty red text!". It does not work in this way. You have to use it as a parameter for TextComponentString .

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I can't understand that sorry
Sun, 08/20/2017 - 01:28

I can't understand that sorry...

 

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
It just keeps saying cannot
Sun, 08/20/2017 - 01:39

It just keeps saying cannot find symbol.

Active 4 years ago
Joined Jun 2016
Points:
3743

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5490
Can be used the §x in the
Sun, 08/20/2017 - 05:10

Can be used the §x in the text input instead of these codes?

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
First of all, if you expect
Sun, 08/20/2017 - 09:27

First of all, if you expect from me that I will just write the whole code for you, you have the wrong person. 2nd, you did not do what I have said. You have to do just one thing, use it as a parameter for TextComponentString, that you already have in the very first generated code. 
An example of parameter : worldObj.getBlockState(pos) , or new ItemStack(Items.stick)
The bold part from both of these is a paramter.
 

Active 5 years ago
Joined Aug 2017
Points:
818

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 206
Can't you just use §?
Sun, 08/20/2017 - 10:31

Can't you just use §?

Active 4 years ago
Joined Jul 2017
Points:
745

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
You cant It dosnt work
Sat, 09/02/2017 - 01:09

You cant

It dosnt work