From ed9517a8b4c5be8c00197ebb38710642659e5446 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Wed, 10 Feb 2016 10:20:13 +0300 Subject: [PATCH] Fix custom model loader reload hook not firing during registration. --- .../client/model/ModelLoaderRegistry.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java b/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java index c4704dc13..33fdf8531 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoaderRegistry.java @@ -26,7 +26,6 @@ public class ModelLoaderRegistry { private static final Set loaders = new HashSet(); private static final Map cache = new HashMap(); - private static boolean registered = false; // Forge built-in loaders static @@ -45,17 +44,7 @@ public class ModelLoaderRegistry public static void registerLoader(ICustomModelLoader loader) { loaders.add(loader); - if(!registered) - { - ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() - { - public void onResourceManagerReload(IResourceManager manager) - { - for (ICustomModelLoader loader : loaders) loader.onResourceManagerReload(manager); - } - }); - registered = true; - } + ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(loader); } public static boolean loaded(ResourceLocation location)