From 849301ae9cd0191304b7a6e2c533f4e10531c41d Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 29 Jun 2018 19:01:04 +0200 Subject: [PATCH] Handle HDSkins' skin type --- .../mixin/MixinNetworkPlayerInfo.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java b/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java index af1323ef..a24eb269 100644 --- a/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java +++ b/src/main/java/com/minelittlepony/mixin/MixinNetworkPlayerInfo.java @@ -9,6 +9,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import com.minelittlepony.MineLittlePony; import com.minelittlepony.PonyManager; import com.minelittlepony.ducks.IPlayerInfo; +import com.mojang.authlib.minecraft.MinecraftProfileTexture; +import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; +import com.voxelmodpack.hdskins.HDSkinManager; import net.minecraft.client.network.NetworkPlayerInfo; @@ -25,7 +28,16 @@ public abstract class MixinNetworkPlayerInfo implements IPlayerInfo { @Override public boolean usesSlimArms() { - if (skinType == null) return PonyManager.isSlimSkin(unwrap().getGameProfile().getId()); + if (skinType == null) { + MinecraftProfileTexture skin = HDSkinManager.INSTANCE.getProfileData(unwrap().getGameProfile()).get(Type.SKIN); + + if (skin != null) { + return "slim".equals(skin.getMetadata("model")); + } + + return PonyManager.isSlimSkin(unwrap().getGameProfile().getId()); + } + return "slim".equals(skinType); } }