package com.minelittlepony.mixin;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import com.minelittlepony.MineLittlePony;
import com.minelittlepony.PonyManager;
import com.minelittlepony.ducks.IPlayerInfo;

import net.minecraft.client.network.NetworkPlayerInfo;

@Mixin(NetworkPlayerInfo.class)
public abstract class MixinNetworkPlayerInfo implements IPlayerInfo {

    @Shadow
    private String skinType;

    @Inject(method = "getSkinType()Ljava/lang/String;", at = @At("RETURN"), cancellable = true)
    private void getSkinType(CallbackInfoReturnable<String> info) {
        info.setReturnValue(MineLittlePony.getInstance().getManager().getPony(unwrap()).getRace(false).getModel().getId(usesSlimArms()));
    }

    @Override
    public boolean usesSlimArms() {
        if (skinType == null) return PonyManager.isSlimSkin(unwrap().getGameProfile().getId());
        return "slim".equals(skinType);
    }
}

@@ -419,16 +419,190 @@
 yerInfo;
+%0Aimport com.mojang.authlib.minecraft.MinecraftProfileTexture;%0Aimport com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;%0Aimport com.voxelmodpack.hdskins.HDSkinManager;
 %0A%0Aimport
@@ -1184,16 +1184,267 @@
 == null)
+ %7B%0A            MinecraftProfileTexture skin = HDSkinManager.INSTANCE.getProfileData(unwrap().getGameProfile()).get(Type.SKIN);%0A%0A            if (skin != null) %7B%0A                return %22slim%22.equals(skin.getMetadata(%22model%22));%0A            %7D%0A%0A           
  return 
@@ -1498,24 +1498,35 @@
 ).getId());%0A
+        %7D%0A%0A
         retu

Handle HDSkins' skin type