SkinChangerMod

SkinChangerMod

4.2k Downloads

Implementation of Mixins

boomboompower opened this issue ยท 2 comments

commented

Mixins may be less compatable with other mods, however it will have better performance compared to using reflection.

The player should be able to choose which method they'd like to use. Mixins are an easy way for us to modify the client however Mixins have a high chance to break across Minecraft versions which makes them highly unstable.

commented

Old Implementation

Used the @Overwrite annotation to completely replace the getLocationSkin(), getLocationCape(), and getSkinType() methods which would definitely have caused issues with other mods using similar methods

New Implementation

(As of ee42eac)

@Overwrite has been substituted with @Inject since inject simply adds to the exisitng function structure without replacing the whole thing.

Each @Inject annotation injects code at the beginning of each method to check if SkinChanger requires the method, if it does it will run some code which will generate an alternate skin/cape/skin type based off what the mod requires.

If SkinChanger does not need to use the injected content then the method will run as usual, maintaining compatability with other mods & the game.

commented

Mixin was removed in c7f6358

This decreased the file size substantially and its removal will likely prompt a performance increase.