mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Update for the latest changes to HDSkins
This commit is contained in:
parent
b3c21cd47d
commit
00d45b30c3
6 changed files with 20 additions and 18 deletions
|
@ -6,10 +6,10 @@ import com.minelittlepony.client.gui.hdskins.GuiSkinsMineLP;
|
|||
import com.minelittlepony.client.pony.PonyManager;
|
||||
import com.minelittlepony.client.render.tileentities.skull.PonySkullRenderer;
|
||||
import com.minelittlepony.common.client.gui.GuiHost;
|
||||
import com.minelittlepony.hdskins.HDSkinManager;
|
||||
import com.minelittlepony.hdskins.server.LegacySkinServer;
|
||||
import com.minelittlepony.hdskins.server.SkinServer;
|
||||
import com.minelittlepony.hdskins.server.ValhallaSkinServer;
|
||||
import com.minelittlepony.hdskins.HDSkins;
|
||||
import com.minelittlepony.hdskins.net.LegacySkinServer;
|
||||
import com.minelittlepony.hdskins.net.SkinServer;
|
||||
import com.minelittlepony.hdskins.net.ValhallaSkinServer;
|
||||
import com.minelittlepony.settings.PonyConfig;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -71,7 +71,7 @@ public class MineLPClient extends MineLittlePony {
|
|||
*/
|
||||
void postInit(Minecraft minecraft) {
|
||||
|
||||
HDSkinManager manager = HDSkinManager.INSTANCE;
|
||||
HDSkins manager = HDSkins.getInstance();
|
||||
// manager.setSkinUrl(SKIN_SERVER_URL);
|
||||
// manager.setGatewayURL(GATEWAY_URL);
|
||||
manager.addSkinModifier(new PonySkinModifier());
|
||||
|
|
|
@ -8,17 +8,19 @@ public class PonySkinModifier implements ISkinModifier {
|
|||
public void convertSkin(ISkinModifier.IDrawer drawer) {
|
||||
int scale = drawer.getImage().getWidth() / 64;
|
||||
|
||||
// TODO: What are these numbers!?
|
||||
|
||||
//top, mirror
|
||||
drawer.draw(scale, 60, 32, 58, 34, 58, 16, 60, 18);
|
||||
// drawer.draw(scale, 60, 32, 58, 34, 58, 16, 60, 18, false, false);
|
||||
//bottom, mirror
|
||||
drawer.draw(scale, 62, 32, 60, 34, 60, 16, 62, 18);
|
||||
// drawer.draw(scale, 62, 32, 60, 34, 60, 16, 62, 18, false, false);
|
||||
//inside
|
||||
drawer.draw(scale, 58, 34, 56, 48, 60, 18, 62, 32);
|
||||
// drawer.draw(scale, 58, 34, 56, 48, 60, 18, 62, 32, false, false);
|
||||
//back
|
||||
drawer.draw(scale, 60, 34, 58, 48, 58, 18, 60, 32);
|
||||
// drawer.draw(scale, 60, 34, 58, 48, 58, 18, 60, 32, false, false);
|
||||
//outside
|
||||
drawer.draw(scale, 62, 34, 60, 48, 56, 18, 58, 32);
|
||||
// drawer.draw(scale, 62, 34, 60, 48, 56, 18, 58, 32, false, false);
|
||||
//back
|
||||
drawer.draw(scale, 64, 34, 62, 48, 62, 18, 64, 32);
|
||||
// drawer.draw(scale, 64, 34, 62, 48, 62, 18, 64, 32, false, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import com.minelittlepony.common.client.gui.IconicToggle;
|
|||
import com.minelittlepony.common.client.gui.Style;
|
||||
import com.minelittlepony.hdskins.gui.EntityPlayerModel;
|
||||
import com.minelittlepony.hdskins.gui.GuiSkins;
|
||||
import com.minelittlepony.hdskins.server.SkinServer;
|
||||
import com.minelittlepony.hdskins.net.SkinServer;
|
||||
import com.minelittlepony.pony.IPonyManager;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.minelittlepony.client.render.layer.LayerHeldPonyItemMagical;
|
|||
import com.minelittlepony.client.render.layer.LayerPonyArmor;
|
||||
import com.minelittlepony.client.render.layer.LayerPonyCustomHead;
|
||||
import com.minelittlepony.client.render.layer.LayerPonyElytra;
|
||||
import com.minelittlepony.hdskins.HDSkinManager;
|
||||
import com.minelittlepony.hdskins.HDSkins;
|
||||
import com.minelittlepony.pony.IPony;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
@ -105,7 +105,7 @@ public abstract class RenderPonyMob<T extends EntityLiving> extends RenderLiving
|
|||
@Override
|
||||
@Nonnull
|
||||
protected final ResourceLocation getEntityTexture(T entity) {
|
||||
return HDSkinManager.INSTANCE.getConvertedSkin(getTexture(entity));
|
||||
return HDSkins.getInstance().getConvertedSkin(getTexture(entity));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.client.render.tileentities.skull;
|
|||
import com.minelittlepony.client.model.components.ModelDeadMau5Ears;
|
||||
import com.minelittlepony.client.pony.Pony;
|
||||
import com.minelittlepony.client.render.RenderPony;
|
||||
import com.minelittlepony.hdskins.HDSkinManager;
|
||||
import com.minelittlepony.hdskins.HDSkins;
|
||||
import com.minelittlepony.settings.PonyConfig;
|
||||
import com.minelittlepony.settings.PonyLevel;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
@ -43,7 +43,7 @@ public class PlayerSkullRenderer extends PonySkull {
|
|||
deadMau5.setVisible(profile != null && "deadmau5".equals(profile.getName()));
|
||||
|
||||
if (profile != null) {
|
||||
ResourceLocation skin = HDSkinManager.INSTANCE.getTextures(profile).get(Type.SKIN);
|
||||
ResourceLocation skin = HDSkins.getInstance().getTextures(profile).get(Type.SKIN);
|
||||
if (skin != null && Pony.getBufferedImage(skin) != null) {
|
||||
return skin;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.minelittlepony.client.settings;
|
||||
|
||||
import com.minelittlepony.hdskins.HDSkinManager;
|
||||
import com.minelittlepony.hdskins.HDSkins;
|
||||
import com.minelittlepony.settings.PonyConfig;
|
||||
import com.minelittlepony.settings.PonyLevel;
|
||||
|
||||
|
@ -10,7 +10,7 @@ public abstract class ClientPonyConfig extends PonyConfig {
|
|||
public void setPonyLevel(PonyLevel ponylevel) {
|
||||
// only trigger reloads when the value actually changes
|
||||
if (ponylevel != getPonyLevel()) {
|
||||
HDSkinManager.INSTANCE.parseSkins();
|
||||
HDSkins.getInstance().parseSkins();
|
||||
}
|
||||
|
||||
super.setPonyLevel(ponylevel);
|
||||
|
|
Loading…
Reference in a new issue