diff --git a/src/main/java/com/minelittlepony/PonyManager.java b/src/main/java/com/minelittlepony/PonyManager.java index da2134de..ef26715f 100644 --- a/src/main/java/com/minelittlepony/PonyManager.java +++ b/src/main/java/com/minelittlepony/PonyManager.java @@ -4,7 +4,6 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.gson.Gson; import com.google.gson.JsonParseException; -import com.minelittlepony.ducks.IPlayerInfo; import com.minelittlepony.model.PMAPI; import com.minelittlepony.pony.data.Pony; import com.minelittlepony.pony.data.PonyLevel; @@ -76,7 +75,12 @@ public class PonyManager implements IResourceManagerReloadListener { * @param player the player */ public Pony getPony(AbstractClientPlayer player) { - return getPony(IPlayerInfo.getPlayerInfo(player).unwrap()); + ResourceLocation skin = player.getLocationSkin(); + UUID uuid = player.getGameProfile().getId(); + + if (skin == null) return getDefaultPony(uuid); + + return getPony(skin, uuid); } public Pony getPony(NetworkPlayerInfo playerInfo) { diff --git a/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java b/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java index 6bb623f7..503c5059 100644 --- a/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java +++ b/src/main/java/com/minelittlepony/ducks/IPlayerInfo.java @@ -1,7 +1,5 @@ package com.minelittlepony.ducks; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.network.NetworkPlayerInfo; public interface IPlayerInfo { @@ -10,13 +8,6 @@ public interface IPlayerInfo { */ boolean usesSlimArms(); - /** - * Gets the player info for the given player. - */ - public static IPlayerInfo getPlayerInfo(AbstractClientPlayer player) { - return (IPlayerInfo)Minecraft.getMinecraft().getConnection().getPlayerInfo(player.getUniqueID()); - } - default NetworkPlayerInfo unwrap() { return (NetworkPlayerInfo)this; }