mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 00:34:28 +00:00
Previously, skinType==0 branch created a ResourceLocation directly without checking if the resource actually exists. This was inconsistent with adjustLocalTexture(), which probes the ResourceManager and falls back on missing assets. Now we call Minecraft.geMinecraft().getResourceManager().getResource(resLoc) and catch IOException. On failure, we fall back to a valid texture via fallBackSkin(npc), ensuring rendering always uses a valid path and avoiding invalid ResourceLocation assignments. This change aligns behavior across texture loading paths and prevents rendering errors when NPC textures are missing.