Started by
TTrixPlays
on
Topic category: Advanced modding
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 :)
You just need to use TextFormatting
Can you please edit it because I don't know how to do that
Do i use &, % or the weird s
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)
Use the wierd S.
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!"
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 .
I can't understand that sorry...
It just keeps saying cannot find symbol.
I want simpily the correct code https://pastebin.com/cJ4uDDin
Can be used the §x in the text input instead of these codes?
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.
Can't you just use §?
You cant
It dosnt work