Fixed NPC textures being adjusted if an NPC has an entity model different from the default CNPC model.

This commit is contained in:
Luis C.M committed 2022-06-12 01:52:57 -05:00
1 parent 63a1525ee2
commit b70d0ba08f
1 file changed
+10 -5
@@ -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;