Fix texture error message for broken textures

-- Fixes #2100
-- Iterates over badTextureDomains instead of missingTextures.keySet()
as a domain can have broken textures without any missing textures
This commit is contained in:
Choonster 2015-11-06 06:52:09 +11:00
parent d790008353
commit 729fca7722

View file

@ -928,7 +928,7 @@ public class FMLClientHandler implements IFMLSidedHandler
logger.error(Strings.repeat("+=", 25)); logger.error(Strings.repeat("+=", 25));
logger.error("The following texture errors were found."); logger.error("The following texture errors were found.");
Map<String,FallbackResourceManager> resManagers = ObfuscationReflectionHelper.getPrivateValue(SimpleReloadableResourceManager.class, (SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager(), "domainResourceManagers", "field_110548"+"_a"); Map<String,FallbackResourceManager> resManagers = ObfuscationReflectionHelper.getPrivateValue(SimpleReloadableResourceManager.class, (SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager(), "domainResourceManagers", "field_110548"+"_a");
for (String resourceDomain : missingTextures.keySet()) for (String resourceDomain : badTextureDomains)
{ {
Set<ResourceLocation> missing = missingTextures.get(resourceDomain); Set<ResourceLocation> missing = missingTextures.get(resourceDomain);
logger.error(Strings.repeat("=", 50)); logger.error(Strings.repeat("=", 50));
@ -964,12 +964,13 @@ public class FMLClientHandler implements IFMLSidedHandler
} }
} }
logger.error(Strings.repeat("-", 25)); logger.error(Strings.repeat("-", 25));
logger.error(" The missing resources for domain {} are:",resourceDomain); if (missingTextures.containsKey(resourceDomain)) {
for (ResourceLocation rl : missing) logger.error(" The missing resources for domain {} are:", resourceDomain);
{ for (ResourceLocation rl : missing) {
logger.error(" {}",rl.getResourcePath()); logger.error(" {}", rl.getResourcePath());
}
logger.error(Strings.repeat("-", 25));
} }
logger.error(Strings.repeat("-", 25));
if (!brokenTextures.containsRow(resourceDomain)) if (!brokenTextures.containsRow(resourceDomain))
{ {
logger.error(" No other errors exist for domain {}", resourceDomain); logger.error(" No other errors exist for domain {}", resourceDomain);