Thoreso's Discs and Villagers Config - Third-Party License Notice
==============================================================

This mod touches two pieces of Blue Skies (https://modrinth.com/mod/blue-skies),
by Modding Legacy (KingPhygieBoo, Silver_David, Lachney), whose terms are at
https://moddinglegacy.com/ML-General-Terms/ ("All Rights Reserved unless
otherwise explicitly stated" - reuse of their code requires explicit
permission; making addons for their projects is explicitly permitted).

Both overrides are entirely OPT-IN and OFF by default:

  - disableTradeSwap (default false): skips Blue Skies' own villager trade
    item-swapping (SkiesTradeModifiers#replaceOffers) inside Everbright and
    Everdawn, so trades configured by other mods aren't silently rewritten.
  - fixDiscTooltip (default false): makes the music disc tooltip subtitle
    read from a normal, per-item lang key (item.blue_skies.<id>.desc) -
    the exact same convention vanilla's own MusicDiscItem.getDescription()
    already uses for every other music disc in the game. Blue Skies'
    SkiesMusicDiscItem overrides that vanilla method to hardcode the
    subtitle instead, so no lang file or resource pack can ever reach it as
    shipped. With this option on and no override present anywhere, the
    tooltip text is unchanged from Blue Skies' own; the point is only to
    make the same lang-file/resource-pack override every other item in the
    game already supports work for these three discs too.

With an option off, this mod's coremod inserts a single check at the top of
the relevant method that reads the config and immediately falls through to
Blue Skies' completely unmodified, original bytecode. No behavior differs
from stock Blue Skies unless a pack owner deliberately edits
config/moe_discsvillagers-common.toml to turn an option on.

Why the disc option took several tries to get right: earlier attempts (a
one-shot ASM rewrite with no config, a KubeJS-side tooltip patch, and an
earlier config-gated ASM rewrite that was removed for a session) each ran
into a different bug before the design settled on the config-gated ASM
rewrite this version ships, which is the correct fix in principle: it makes
the tooltip lang-key-driven without changing anything visible unless a lang
override for that key exists somewhere in the active resource pack stack.

Even after that rewrite was working correctly (verified by bytecode
inspection and by forcing the transform to fire unconditionally), the
disc tooltips still didn't show the pack's intended override text. The
actual cause turned out to be nothing to do with this mod: the modpack's
own KubeJS-generated resource pack happened to define
item.blue_skies.<id>.desc itself (added earlier as placeholder text that,
coincidentally, exactly matched Blue Skies' original hardcoded subtitle),
and KubeJS's resource pack loads at a fixed high priority that beat the
pack's intended override pack in the resource pack stack. Once that
duplicate placeholder entry was removed from the KubeJS pack, the intended
override resolved correctly. This is noted here for any future maintainer:
if fixDiscTooltip is on and the tooltip still doesn't reflect an expected
override, check for another active pack redefining the same lang key
before suspecting this mod's coremod.

This mod does not bundle or redistribute any copy of Blue Skies. At
runtime, via a Forge coremod (a bytecode transformer, see
coremods/discsvillagers.js), it patches the user's own separately
installed copy of Blue Skies.

This mod's own original code (the coremod transformer script, and the two
small Java classes in moe/thoreso/discsvillagers/) is not derived from
Blue Skies' source and remains All Rights Reserved by its author, Thoreso.

If you are Modding Legacy and have questions about this mod, or would like
it handled differently, please reach out - contact details are on the
license page above.
