Bug Closed · Invalid

Color codes now require &r even if it shouldn't be needed

#3079 opened by Unknown 4 years ago

Unknownreported this bug

Summary

Color codes now require &r a lot more then before, breaking a lot of old stuff

Mythicmobs version: snapshot Build 4164 Crucible snapshot: snapshot Build 3630 Minecraft 1.18.2

Basically items names/mob names that used to work properly are now broken in newer versions. The reason for this is that the &m, &n and &k codes used to reset just by starting a new color (&4, &5, etc.), but now it requires the &r format code character or the code will remember the previous &l, &m, &n and &k codes. This is a HUGE issue for older servers like mine since thousand of item names, boss names, skill messages etc. broke all of a sudden

Steps to reproduce Just test this item out:

galactica:
  Id: diamond_sword
  Display: '&1&l&m&k*&f&l&m*-&b&l&m={&3&l&m={&9&l&m=&1&l&m&1&l&m{&1&l&m&1&l&m&n..&9&l&m&n*&1&l&m&n..&f&l&nGalactica&1&l&m&n..&9&l&m&n*&1&l&m&n..&1&l&m}&9&l&m=&3&l&m}=&b&l&m}=&f&l&m-*&1&l&m&k*'
  Attributes:
    MainHand:
      Health: 4
      Damage: 7
      MovementSpeed: 0.1
  Options:
    Unbreakable: true
  Enchantments:
  - DAMAGE_ALL:6
  - DAMAGE_UNDEAD:6
  - DAMAGE_ARTHROPODS:4
  - LOOT_BONUS_MOBS:3
  Lore:
  - '&8&l&m*&r &f&oDream of a weak Star'
  - '&8&l&m*&r &3AstroPack'
  - '&f&l&m*---=---=---=---=---=---=---=---=---*'
  - '&1&l&m= &r &bSkill: &9MoonLeap'
  - '&1&l&m= &r &bSkill: &9MoonGravity'
  - '&8&l&m*&r &7Right click &f>>&7 Execute a small leap'
  - '&8&l&m*&r &7Right click + Crouching &f>>&7 Execute a big jump'
  - '&f&l&m*---=---=---=---=---=---=---=---=---*'
  Skills:
  - effect:particles{p=reddust;amount=16;speed=0.01;y=0.8;hs=0.5;vs=0.8;color=#4268f4} @self ~onTimer:15
  - skill{s=moonleap} ~onUse
  - skill{s=moongravity} ~onUse

Current behavior

Currently, the codes require an &r format code to reset a &l, &m, &n and &k format codes rendering the item name like this: [Legacy attachment omitted]

Intended correct behavior

The &l, &m, &n and &k format codes should be stopped automatically just by starting a new color (&4, &5, etc.) like they used to, making the item look like this: [Legacy attachment omitted]

Proposed fixes

Just make the &l, &m, &n and &k formatting codes reset when starting a new color, like they used to

Unknowncommented

Yes! This problem is particularly deadly! All my players' items and shopkeeper's items all need to be changed, please fix this!

Unknowncommented

The way minecraft's colors work has completely changed, this doesn't really have anything to do with Mythic. You have to use the adventure or minimessage syntax now.

<red><bold>Test</bold> test test

Sign in to join the discussion.