mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-30 07:57:59 +01:00
Handle HDSkins' skin type
This commit is contained in:
parent
9096a015c5
commit
849301ae9c
1 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue