From b70d0ba08f18ab22b56a0194f5f397523ae82e99 Mon Sep 17 00:00:00 2001 From: "Luis C.M" Date: Sun, 12 Jun 2022 01:52:57 -0500 Subject: [PATCH] Fixed NPC textures being adjusted if an NPC has an entity model different from the default CNPC model. --- .../npcs/client/renderer/RenderNPCInterface.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java b/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java index 22a6a2eeb..47caf4f90 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderNPCInterface.java @@ -313,11 +313,16 @@ public class RenderNPCInterface extends RenderLiving{ EntityNPCInterface npc = (EntityNPCInterface) entity; if (npc.textureLocation == null) { if (npc.display.skinType == 0) { - if (!(npc.display.texture).equals("")) { - //npc.textureLocation = new ResourceLocation(npc.display.texture); - try { - npc.textureLocation = adjustLocalTexture(npc, new ResourceLocation(npc.display.texture)); - } catch (IOException ignored) {} + if (npc instanceof EntityCustomNpc && ((EntityCustomNpc) npc).modelData.entityClass == null) { + if (!(npc.display.texture).equals("")) { + //npc.textureLocation = new ResourceLocation(npc.display.texture); + try { + npc.textureLocation = adjustLocalTexture(npc, new ResourceLocation(npc.display.texture)); + } catch (IOException ignored) { + } + } + } else { + npc.textureLocation = new ResourceLocation(npc.display.texture); } } else if(LastTextureTick < 5) { //fixes request flood somewhat return AbstractClientPlayer.locationStevePng;