Color Names

Started by DutchAT on

Topic category: Help with modding (Java Edition)

Last seen on 18:46, 16. Oct 2021
Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Color Names

How can I set custom color (like blue, red, gold etc.) to a Item's Name or description?

 

Thanks

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use addInformation method.
Sun, 10/16/2016 - 00:12

Use addInformation method. This method have these fields:

(ItemStack stack, EntityPlayer player, List list, boolean par4)

For adding tooltip you need addInformation an entry to the list variable.Color in older versions was set using EnumChatFormatting, in 1.9+ it is TextFormatting. (Exemplář: EnumChatFormatting.RED+"I am an item" )

The name setting is just changing "displayName" variable of the stack variable ( I am not fully sure about name of the var) Also I recommend translating from .lang file

Last seen on 18:46, 16. Oct 2021
Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Use addInformation method.
Sun, 10/16/2016 - 00:21

@#1 Ok, my mind just blow up

 

Last seen on 18:46, 16. Oct 2021
Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Use addInformation method.
Sun, 10/16/2016 - 00:21

@#1 Ok, my mind just blow up

 

Last seen on 18:46, 16. Oct 2021
Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you give me an example of
Sun, 10/16/2016 - 00:27

Can you give me an example of the code and where must i place it? xd

 

Last seen on 18:46, 16. Oct 2021
Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you give me an example of
Sun, 10/16/2016 - 00:27

Can you give me an example of the code and where must i place it? xd