mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix refreshResources not happening if an error occurs.
This commit is contained in:
1 parent
810b1f3075
commit
fff86ee9d3
5 files changed
+9
-21
No files matched your search
@@ -227,6 +227,10 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
client.refreshResources();
|
||||
}
|
||||
|
||||
Map<String,Map<String,String>> sharedModList = (Map<String, Map<String, String>>) Launch.blackboard.get("modList");
|
||||
if (sharedModList == null)
|
||||
@@ -279,7 +283,8 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
return;
|
||||
}
|
||||
|
||||
// Reload resources
|
||||
// Reload resources has to happen early, or minecraft itself has resource loading issues
|
||||
// This is a second refresh for mods that register stuff late!
|
||||
client.refreshResources();
|
||||
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.instance.entityRenderMap);
|
||||
guiFactories = HashBiMap.create();
|
||||
@@ -564,12 +569,6 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
client.refreshResources();
|
||||
}
|
||||
|
||||
public IResourcePack getResourcePackFor(String modId)
|
||||
{
|
||||
return resourcePackMap.get(modId);
|
||||
|
||||
@@ -514,11 +514,6 @@ public class FMLCommonHandler
|
||||
sidedDelegate.addModAsResource(container);
|
||||
}
|
||||
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
sidedDelegate.updateResourcePackList();
|
||||
}
|
||||
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@ public interface IFMLSidedHandler
|
||||
|
||||
void addModAsResource(ModContainer container);
|
||||
|
||||
void updateResourcePackList();
|
||||
|
||||
String getCurrentLanguage();
|
||||
|
||||
void serverStopped();
|
||||
|
||||
@@ -109,7 +109,6 @@ public class LoadController
|
||||
}
|
||||
|
||||
eventChannels = eventBus.build();
|
||||
FMLCommonHandler.instance().updateResourcePackList();
|
||||
}
|
||||
|
||||
public void distributeStateMessage(LoaderState state, Object... eventData)
|
||||
|
||||
@@ -34,6 +34,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.StartupQuery;
|
||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
||||
import cpw.mods.fml.common.functions.GenericIterableFactory;
|
||||
import cpw.mods.fml.common.network.FMLNetworkEvent;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -176,7 +177,8 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
// rudimentary command processing, check for fml confirm/cancel and stop commands
|
||||
synchronized (dedServer.pendingCommandList)
|
||||
{
|
||||
for (Iterator<ServerCommand> it = dedServer.pendingCommandList.iterator(); it.hasNext(); )
|
||||
|
||||
for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext();)
|
||||
{
|
||||
String cmd = it.next().command.trim().toLowerCase();
|
||||
|
||||
@@ -219,11 +221,6 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
LanguageRegistry.instance().loadLanguagesFor(container, Side.SERVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getCurrentLanguage()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user