From 28852597a7825871caee8540a6f39c482212b5ec Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 25 Feb 2023 22:06:51 +0000 Subject: [PATCH] Only use a player's skin if it's ponified skin. (Human skins don't fit villagers). Fixes #228 --- .../entity/npc/textures/PlayerTextureSupplier.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/render/entity/npc/textures/PlayerTextureSupplier.java b/src/main/java/com/minelittlepony/client/render/entity/npc/textures/PlayerTextureSupplier.java index 8f062d3e..a1320ad4 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/npc/textures/PlayerTextureSupplier.java +++ b/src/main/java/com/minelittlepony/client/render/entity/npc/textures/PlayerTextureSupplier.java @@ -5,14 +5,11 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; -import com.minelittlepony.api.config.PonyConfig; -import com.minelittlepony.api.config.PonyLevel; import com.minelittlepony.api.pony.IPony; import com.minelittlepony.client.SkinsProxy; import com.minelittlepony.util.FunctionUtil; import com.mojang.authlib.GameProfile; -import java.util.*; import java.util.function.Function; public class PlayerTextureSupplier { @@ -28,13 +25,10 @@ public class PlayerTextureSupplier { } static final class Entry { - private final UUID uuid; - @Nullable private GameProfile profile; Entry(LivingEntity entity) { - uuid = entity.getUuid(); SkullBlockEntity.loadProperties(new GameProfile(null, entity.getCustomName().getString()), resolved -> { profile = resolved; }); @@ -44,12 +38,7 @@ public class PlayerTextureSupplier { public Identifier getTexture() { if (profile != null) { Identifier skin = SkinsProxy.instance.getSkinTexture(profile); - if (skin != null) { - if (IPony.getManager().getPony(skin).race().isHuman()) { - if (PonyConfig.getInstance().ponyLevel.get() == PonyLevel.PONIES) { - return IPony.getManager().getBackgroundPony(uuid).texture(); - } - } + if (skin != null && !IPony.getManager().getPony(skin).race().isHuman()) { return skin; } }