Blood Magic

Blood Magic

90M Downloads

Chat messages contain invalid formatting

DaedalusGame opened this issue ยท 1 comments

commented

Issue Description:

Chat messages contain %d, this is wrong as the only supported formatting for text components is %% and %s. Why did nobody ever notice? Because Mojang actually strips out %d and %f at the lang file parsing level, which also generates wrong behavior. Specifically, it will replace any occurence of %d and %f with %$1s (first parameter as string), so lang file entries containing two %d will just format the first argument twice.

What happens:

Currently, everything works fine, but if another mod were to AT the pattern they use to strip %d and %f...
tooltip.bloodmagic.sigil.divination.currentEssence will be displayed instead of the actual string.

What you expected to happen:

etc

Steps to reproduce:

  1. Use Access Transformers to replace the pattern in net.minecraft.client.resources.Locale with something more reasonable
    ...

alternatively

  1. Install Embers Rekindled
    ...

Affected Versions:

  • BloodMagic: since >3 years ago
  • Minecraft: etc
  • Forge: etc

see DaedalusGame/EmbersRekindled#46

commented

Why is it my responsibility to work around a breaking change you made to vanilla functionality? If what you do is breaking other mods, maybe you shouldn't do that.