diff --git a/src/main/java/net/minecraftforge/client/model/obj/OBJLoader.java b/src/main/java/net/minecraftforge/client/model/obj/OBJLoader.java index b398fbaee..aa1c8792d 100644 --- a/src/main/java/net/minecraftforge/client/model/obj/OBJLoader.java +++ b/src/main/java/net/minecraftforge/client/model/obj/OBJLoader.java @@ -27,6 +27,7 @@ public enum OBJLoader implements ICustomModelLoader { private IResourceManager manager; private final Set enabledDomains = new HashSet(); private final Map cache = new HashMap(); + private final Map errors = new HashMap(); public void addDomain(String domain) { @@ -38,6 +39,7 @@ public enum OBJLoader implements ICustomModelLoader { { this.manager = resourceManager; cache.clear(); + errors.clear(); } public boolean accepts(ResourceLocation modelLocation) @@ -69,13 +71,17 @@ public enum OBJLoader implements ICustomModelLoader { { model = parser.parse(); } + catch (Exception e) + { + errors.put(modelLocation, e); + } finally { cache.put(modelLocation, model); } } OBJModel model = cache.get(file); - if (model == null) throw new ModelLoaderRegistry.LoaderException("Error loading model previously: " + file); + if (model == null) throw new ModelLoaderRegistry.LoaderException("Error loading model previously: " + file, errors.get(modelLocation)); return model; } } diff --git a/src/main/java/net/minecraftforge/fml/common/registry/IForgeRegistryEntry.java b/src/main/java/net/minecraftforge/fml/common/registry/IForgeRegistryEntry.java index fd3e33235..b0f3a445a 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/IForgeRegistryEntry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/IForgeRegistryEntry.java @@ -60,7 +60,7 @@ public interface IForgeRegistryEntry String prefix = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? "minecraft" : mc.getModId().toLowerCase(); if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0) { - FMLLog.bigWarning("Dangerous alternative prefix %s for name %s, invalid registry invocation/invalid name?", oldPrefix, name); + FMLLog.bigWarning("Dangerous alternative prefix `%s` for name `%s`, expected `%s` invalid registry invocation/invalid name?", oldPrefix, name, prefix); prefix = oldPrefix; } this.registryName = new ResourceLocation(prefix, name);