Color Names

Started by DutchAT on Sat, 10/15/2016 - 23:21

Topic category: Help with modding (Java Edition)

Last seen on 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Color Names
Sat, 10/15/2016 - 23:21

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

 

Thanks

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

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

@#1 Ok, my mind just blow up

 

Last seen on 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

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

@#1 Ok, my mind just blow up

 

Last seen on 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 16:15, 6. May 2020
Joined Oct 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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