Pixelmon Mod - Bug tracker

9.1.5 - Setting pokemon nickname to formatted text component (either through Java or through /pokecolor) does not apply style to GUI's, only to the entity's nametag pending

Ticket description:
I am a mod developer trying to implement a feature similar to the existing /pokecolor command in Pixelmon. I am finding that a pokemon with a display name that contains styling will not be visible with that styling in any GUI. The styling will only be visible in the pokemon's entity's nametag. This means that the styling is not visible in places such as the party overlay, the summary/stats/moves GUI, nor the battle overlay. This is true both for the /pokecolor command and also for using the
Code: Select allsetNickname
method through the Java API and passing in a formatted text component.

I have tried to work around this by using the deprecated API method
Code: Select allsetNickname
that takes in a string instead of a formatted text component. By passing in a string with style tokens (i.e tokens prefixed with the character §), I find that I am able to display the styling everywhere that I expect it to. Unfortunately, this also causes a number of side effects, primarily causing any battle messages that contain the pokemon's stylized display name to vanish or glitch out. I have tried various combinations of using formatted text components and style tokens together, and have also tried adding reset tokens (§r) at the end of the display names, but to no avail. Additionally, pokemon with their nicknames set this way seem to become corrupted in that they begin to cause crashes at the start and end of any battle: https://pastebin.com/HWdvs0WV

I would expect that the original approach of using either /pokecolor or the
Code: Select allsetNickname
method would allow stylized display names to appear in all GUI's.

Screenshots that show stylized display names not appearing in GUI's:
Image (name appears above entity, but not in party view)
Image (name appears above entity, but not in summary GUI)
Image (name does not appear in battle)

Screenshots that show my hack/workaround displaying the stylized name as expected, but causing battle messages to not show properly
Image (bonus stats are applied here from a custom mod)
Image (message showing the move Jolteon used is missing)

Comments

#30259 Posted by DThaiPome » 04 Jul 2023 20:59

Images don't seem to be embedding properly but they can still be viewed by opening their links. Sorry about that.

#30264 Posted by LordSamosa » 05 Jul 2023 12:27

Thanks for the report, moved to internal

Ticket details

  • Ticket ID: 20666
  • Project: Pixelmon Mod
  • Status: Pending
  • Component: Graphics
  • Project version: 1.16.5-9.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: forge-1.16.5-36.2.39
  • What else would be useful to know?: arclight-forge-1.16.5-1.0.24
  • Assigned to: LordSamosa
  • Reported by: DThaiPome (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 04 Jul 2023 20:57
  • Ticket last visited by: Decent60 on 05 Jul 2023 21:29
JOIN THE TEAM