diff --git a/src/main/java/com/minelittlepony/hdskins/client/profile/SkinLoader.java b/src/main/java/com/minelittlepony/hdskins/client/profile/SkinLoader.java index 6040e2aa..4079a585 100644 --- a/src/main/java/com/minelittlepony/hdskins/client/profile/SkinLoader.java +++ b/src/main/java/com/minelittlepony/hdskins/client/profile/SkinLoader.java @@ -12,6 +12,7 @@ import com.minelittlepony.hdskins.Memoize; import com.minelittlepony.hdskins.client.HDSkins; import com.minelittlepony.hdskins.client.SkinCacheClearCallback; +import com.minelittlepony.hdskins.client.VanillaModels; import com.minelittlepony.hdskins.profile.SkinType; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; @@ -71,7 +72,7 @@ private CompletableFuture fetchTextures(Map { return new ProvidedSkins( - Optional.ofNullable(textures.get(SkinType.SKIN)).map(skin -> skin.getMetadata("model")), + Optional.ofNullable(textures.get(SkinType.SKIN)).map(skin -> VanillaModels.of(skin.getMetadata("model"))), tasks.keySet().stream().map(SkinType::getId).collect(Collectors.toSet()), tasks.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry -> { return entry.getValue().join(); diff --git a/src/main/java/com/minelittlepony/hdskins/client/resources/Texture.java b/src/main/java/com/minelittlepony/hdskins/client/resources/Texture.java index fb9db3c5..1c382e3b 100644 --- a/src/main/java/com/minelittlepony/hdskins/client/resources/Texture.java +++ b/src/main/java/com/minelittlepony/hdskins/client/resources/Texture.java @@ -5,7 +5,6 @@ import org.jetbrains.annotations.Nullable; -import com.minelittlepony.hdskins.client.VanillaModels; import com.minelittlepony.hdskins.profile.SkinType; import net.minecraft.client.MinecraftClient; @@ -40,15 +39,13 @@ public boolean isLoaded() { abstract class UriTexture extends HDPlayerSkinTexture implements Texture { - private final String model; - private final String fileUrl; private final Identifier id; public static Texture.UriTexture create(Identifier id, File cacheFile, String url, SkinType type, String model, Identifier fallback, @Nullable Runnable callback) { boolean[] uploaded = new boolean[1]; - return new UriTexture(id, cacheFile, url, type, model, fallback, () -> { + return new UriTexture(id, cacheFile, url, type, fallback, () -> { uploaded[0] = true; if (callback != null) { callback.run(); @@ -67,10 +64,9 @@ public void clearGlId() { }; } - UriTexture(Identifier id, File cacheFile, String url, SkinType type, String model, Identifier fallback, Runnable callack) { + UriTexture(Identifier id, File cacheFile, String url, SkinType type, Identifier fallback, Runnable callack) { super(cacheFile, url, type, fallback, callack); this.id = id; - this.model = VanillaModels.of(model); this.fileUrl = url; } @@ -84,14 +80,6 @@ public InputStream openStream() throws IOException { return new URL(fileUrl).openStream(); } - public boolean hasModel() { - return model != null; - } - - public boolean usesThinArms() { - return VanillaModels.isSlim(model); - } - @Override protected TextureData loadTextureData(ResourceManager resourceManager) { if (!resourceManager.getResource(location).isPresent()) {