Revert "Fix refreshResources not happening if an error occurs."
This reverts commit fff86ee9d35874bdf77a1eaabe77615441644064.
This commit is contained in:
parent
7229ba5c83
commit
f628bde87b
5 changed files with 21 additions and 9 deletions
|
@ -229,10 +229,6 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
|
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
client.refreshResources();
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String,Map<String,String>> sharedModList = (Map<String, Map<String, String>>) Launch.blackboard.get("modList");
|
Map<String,Map<String,String>> sharedModList = (Map<String, Map<String, String>>) Launch.blackboard.get("modList");
|
||||||
if (sharedModList == null)
|
if (sharedModList == null)
|
||||||
|
@ -285,8 +281,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload resources has to happen early, or minecraft itself has resource loading issues
|
// Reload resources
|
||||||
// This is a second refresh for mods that register stuff late!
|
|
||||||
client.refreshResources();
|
client.refreshResources();
|
||||||
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.instance.entityRenderMap);
|
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.instance.entityRenderMap);
|
||||||
guiFactories = HashBiMap.create();
|
guiFactories = HashBiMap.create();
|
||||||
|
@ -571,6 +566,12 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateResourcePackList()
|
||||||
|
{
|
||||||
|
client.refreshResources();
|
||||||
|
}
|
||||||
|
|
||||||
public IResourcePack getResourcePackFor(String modId)
|
public IResourcePack getResourcePackFor(String modId)
|
||||||
{
|
{
|
||||||
return resourcePackMap.get(modId);
|
return resourcePackMap.get(modId);
|
||||||
|
|
|
@ -514,6 +514,11 @@ public class FMLCommonHandler
|
||||||
sidedDelegate.addModAsResource(container);
|
sidedDelegate.addModAsResource(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateResourcePackList()
|
||||||
|
{
|
||||||
|
sidedDelegate.updateResourcePackList();
|
||||||
|
}
|
||||||
|
|
||||||
public String getCurrentLanguage()
|
public String getCurrentLanguage()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ public interface IFMLSidedHandler
|
||||||
|
|
||||||
void addModAsResource(ModContainer container);
|
void addModAsResource(ModContainer container);
|
||||||
|
|
||||||
|
void updateResourcePackList();
|
||||||
|
|
||||||
String getCurrentLanguage();
|
String getCurrentLanguage();
|
||||||
|
|
||||||
void serverStopped();
|
void serverStopped();
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class LoadController
|
||||||
}
|
}
|
||||||
|
|
||||||
eventChannels = eventBus.build();
|
eventChannels = eventBus.build();
|
||||||
|
FMLCommonHandler.instance().updateResourcePackList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void distributeStateMessage(LoaderState state, Object... eventData)
|
public void distributeStateMessage(LoaderState state, Object... eventData)
|
||||||
|
|
|
@ -34,7 +34,6 @@ import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.ModContainer;
|
import cpw.mods.fml.common.ModContainer;
|
||||||
import cpw.mods.fml.common.StartupQuery;
|
import cpw.mods.fml.common.StartupQuery;
|
||||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
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.network.FMLNetworkEvent;
|
||||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
@ -177,8 +176,7 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||||
// rudimentary command processing, check for fml confirm/cancel and stop commands
|
// rudimentary command processing, check for fml confirm/cancel and stop commands
|
||||||
synchronized (dedServer.pendingCommandList)
|
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();
|
String cmd = it.next().command.trim().toLowerCase();
|
||||||
|
|
||||||
|
@ -221,6 +219,11 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||||
LanguageRegistry.instance().loadLanguagesFor(container, Side.SERVER);
|
LanguageRegistry.instance().loadLanguagesFor(container, Side.SERVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateResourcePackList()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getCurrentLanguage()
|
public String getCurrentLanguage()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue