Update HD Skins

This commit is contained in:
Sollace 2019-08-23 11:12:20 +02:00
parent 3a094fe1bf
commit 8885b14593
6 changed files with 18 additions and 18 deletions

View file

@ -18,4 +18,4 @@ org.gradle.daemon=false
# Dependencies
fabric_version=0.3.0+
kirin_version=1.14.4-1.4.4
hd_skins_version=1.14.4-5.4.3
hd_skins_version=1.14.4-5.5-SNAPSHOT

View file

@ -2,8 +2,8 @@ package com.minelittlepony.client.hdskins;
import com.minelittlepony.client.SkinsProxy;
import com.minelittlepony.hdskins.HDSkins;
import com.minelittlepony.hdskins.profile.SkinType;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import net.minecraft.util.Identifier;
class HDSkinsProxy extends SkinsProxy {
@ -11,7 +11,7 @@ class HDSkinsProxy extends SkinsProxy {
@Override
public Identifier getSkinTexture(GameProfile profile) {
Identifier skin = HDSkins.getInstance().getTextures(profile).get(MinecraftProfileTexture.Type.SKIN);
Identifier skin = HDSkins.getInstance().getProfileRepository().getTextures(profile).get(SkinType.SKIN);
if (skin != null) {
return skin;

View file

@ -2,8 +2,8 @@ package com.minelittlepony.client.hdskins.gui;
import com.minelittlepony.hdskins.dummy.DummyPlayer;
import com.minelittlepony.hdskins.dummy.TextureProxy;
import com.minelittlepony.hdskins.profile.SkinType;
import com.minelittlepony.hdskins.resources.LocalTexture;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
/**
* Dummy model used for the skin uploading screen.
@ -19,7 +19,7 @@ public class DummyPony extends DummyPlayer {
public void setWet(boolean wet) {
this.wet = wet;
LocalTexture skin = getTextures().get(Type.SKIN);
LocalTexture skin = getTextures().get(SkinType.SKIN);
if (wet && skin.getId() == PonyPreview.NO_SKIN_PONY) {
skin.reset();

View file

@ -11,9 +11,9 @@ import com.minelittlepony.client.render.layer.LayerHeldPonyItemMagical;
import com.minelittlepony.client.render.layer.LayerPonyArmor;
import com.minelittlepony.client.render.layer.LayerPonyElytra;
import com.minelittlepony.hdskins.dummy.DummyPlayerRenderer;
import com.minelittlepony.hdskins.profile.SkinType;
import com.minelittlepony.pony.IPony;
import com.minelittlepony.pony.meta.Race;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
import com.mojang.blaze3d.platform.GlStateManager;
import net.fabricmc.fabric.api.client.render.EntityRendererRegistry;
@ -76,7 +76,7 @@ public class DummyPonyRenderer extends DummyPlayerRenderer<DummyPony, ClientPony
Race race = thePony.getRace(false);
boolean canWet = playermodel.wet && (loc == playermodel.getTextures().getBlankSkin(Type.SKIN) || race == Race.SEAPONY);
boolean canWet = playermodel.wet && (loc == playermodel.getTextures().getBlankSkin(SkinType.SKIN) || race == Race.SEAPONY);
playerModel = canWet ? PlayerModels.SEAPONY.getWrappedModel(slim) : PlayerModels.forRace(thePony.getRace(true)).getWrappedModel(slim);
playerModel.apply(thePony.getMetadata());
@ -101,7 +101,7 @@ public class DummyPonyRenderer extends DummyPlayerRenderer<DummyPony, ClientPony
return new LayerPonyElytra<DummyPony, ClientPonyModel<DummyPony>>(this) {
@Override
protected Identifier getElytraTexture(DummyPony entity) {
return entity.getTextures().get(Type.ELYTRA).getId();
return entity.getTextures().get(SkinType.ELYTRA).getId();
}
};
}

View file

@ -6,9 +6,9 @@ import com.minelittlepony.common.client.gui.style.Style;
import com.minelittlepony.hdskins.dummy.PlayerPreview;
import com.minelittlepony.hdskins.gui.GuiSkins;
import com.minelittlepony.hdskins.net.SkinServerList;
import com.minelittlepony.hdskins.profile.SkinType;
import com.minelittlepony.pony.IPonyManager;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
import net.minecraft.item.Items;
import net.minecraft.sound.SoundEvents;
@ -74,21 +74,21 @@ public class GuiSkinsMineLP extends GuiSkins {
}
@Override
public void onSetLocalSkin(Type type) {
public void onSetLocalSkin(SkinType type) {
super.onSetLocalSkin(type);
MineLittlePony.logger.debug("Invalidating old local skin, checking updated local skin");
if (type == Type.SKIN) {
ponyManager.removePony(previewer.getLocal().getTextures().get(Type.SKIN).getId());
if (type == SkinType.SKIN) {
ponyManager.removePony(previewer.getLocal().getTextures().get(SkinType.SKIN).getId());
}
}
@Override
public void onSetRemoteSkin(Type type, Identifier location, MinecraftProfileTexture profileTexture) {
public void onSetRemoteSkin(SkinType type, Identifier location, MinecraftProfileTexture profileTexture) {
super.onSetRemoteSkin(type, location, profileTexture);
MineLittlePony.logger.debug("Invalidating old remote skin, checking updated remote skin");
if (type == Type.SKIN) {
if (type == SkinType.SKIN) {
ponyManager.removePony(location);
}
}

View file

@ -5,9 +5,9 @@ import net.minecraft.util.Identifier;
import com.minelittlepony.client.MineLittlePony;
import com.minelittlepony.hdskins.dummy.DummyPlayer;
import com.minelittlepony.hdskins.dummy.PlayerPreview;
import com.minelittlepony.hdskins.profile.SkinType;
import com.minelittlepony.pony.IPony;
import com.minelittlepony.pony.meta.Race;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
class PonyPreview extends PlayerPreview {
@ -23,8 +23,8 @@ class PonyPreview extends PlayerPreview {
}
@Override
public Identifier getBlankSkin(Type type) {
if (type == Type.SKIN) {
public Identifier getBlankSkin(SkinType type) {
if (type == SkinType.SKIN) {
// Initialization order means this method might be called before class members have been initialized.
// This is something that needs to be fixed in HDSkins
return localPony != null && localPony.wet ? NO_SKIN_SEAPONY : NO_SKIN_PONY;
@ -33,7 +33,7 @@ class PonyPreview extends PlayerPreview {
}
protected DummyPlayer ponify(DummyPlayer human, DummyPlayer pony) {
Identifier loc = human.getTextures().get(Type.SKIN).getId();
Identifier loc = human.getTextures().get(SkinType.SKIN).getId();
if (loc == null) {
return pony;