Common code for MsDogGirl's mods. Includes dynamic skin swapping and emissive skin layer APIs.

If you're not a dev, this is another boring library mod. Just install it with the mod that requires it- that's all there is to it.
If you are a dev, then this is a another not-so-boring library mod. It has two APIs included, SkinSwapper and SkinGlowLayer, which I use in my mod Cyberware: Visible Modifications. The names pretty much say what they do.
You can find all the methods included on the GitHub page. Their function is simple: they swap out parts of the player skin with a skin file you've provided. You can swap out any part of the player's skin like their arms and legs, but leave the rest of their skin untouched.
There are also methods to add transparent overlays to a skin in the same way. For example, this is useful if you're making something like armor and want it to have a bit of a tighter fit without fussing with render layers yourself.
But how does it do this, you ask? Well, it actually fetches the player's skin and makes a compound image to load instead. No render layers involved here, keeping compatibility with other mods at a max.
This works the same as the SkinSwapper, but instead adds emissive pixels to the player skin via a render layer. You just need a transparent image with the pixels you want to glow and use that when you call the methods.
This depends on the you and your use case as a dev. SkinGlowLayer, however, has some compat built in with Epic Fight. It will turn itself off in fight mode, preventing visual glitches... for the most part.
If you're publishing the pack, it needs to be on either Modrinth or Curseforge.
Conversation