From 0bf3c8d216914484357fa02e22a9686a960b2913 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 25 Nov 2022 20:24:58 +0000 Subject: [PATCH] Fixed skins appearing slim when they're actually not --- src/hdskins/java/com/voxelmodpack/hdskins/VanillaModels.java | 4 ++-- .../com/voxelmodpack/hdskins/resources/PreviewTexture.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/VanillaModels.java b/src/hdskins/java/com/voxelmodpack/hdskins/VanillaModels.java index 3595381a..eb4424cc 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/VanillaModels.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/VanillaModels.java @@ -5,7 +5,7 @@ public class VanillaModels { public static final String DEFAULT = "default"; public static String of(String model) { - return model != null && model.contains(SLIM) ? SLIM : DEFAULT; + return model == null ? DEFAULT : model; } public static String nonNull(String model) { @@ -17,6 +17,6 @@ public class VanillaModels { } public static boolean isFat(String model) { - return DEFAULT.equals(model); + return model == null || DEFAULT.equals(model); } } diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/resources/PreviewTexture.java b/src/hdskins/java/com/voxelmodpack/hdskins/resources/PreviewTexture.java index 3cce99e2..d3e5125b 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/resources/PreviewTexture.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/resources/PreviewTexture.java @@ -23,7 +23,7 @@ public class PreviewTexture extends ThreadDownloadImageData { public PreviewTexture(@Nullable String model, String url, ResourceLocation fallbackTexture, @Nullable IImageBuffer imageBuffer) { super(null, url, fallbackTexture, imageBuffer); - this.model = VanillaModels.nonNull(model); + this.model = VanillaModels.of(model); this.fileUrl = url; }