mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Split loadmods into loadmods and preinitmods, to allow resource loading to occur *always* between the two phases. This should fix
mods not being able to access resources during preinit. PS: I'm still not modding.
This commit is contained in:
1 parent
738ce1d7cd
commit
b0eb1ef7c6
6 files changed
+30
-25
No files matched your search
@@ -229,7 +229,25 @@ 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();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Loader.instance().preinitializeMods();
|
||||
}
|
||||
catch (CustomModLoadingErrorDisplayException custom)
|
||||
{
|
||||
FMLLog.log(Level.ERROR, custom, "A custom exception was thrown by a mod, the game will now halt");
|
||||
customError = custom;
|
||||
}
|
||||
catch (LoaderException le)
|
||||
{
|
||||
haltGame("There was a severe problem during mod loading that has caused the game to fail", le);
|
||||
return;
|
||||
}
|
||||
Map<String,Map<String,String>> sharedModList = (Map<String, Map<String, String>>) Launch.blackboard.get("modList");
|
||||
if (sharedModList == null)
|
||||
{
|
||||
@@ -566,12 +584,6 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateResourcePackList()
|
||||
{
|
||||
client.refreshResources();
|
||||
}
|
||||
|
||||
public IResourcePack getResourcePackFor(String modId)
|
||||
{
|
||||
return resourcePackMap.get(modId);
|
||||
@@ -813,7 +825,7 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient)
|
||||
{
|
||||
playClientBlock.countDown();
|
||||
this.currentPlayClient = new WeakReference(netHandlerPlayClient);
|
||||
this.currentPlayClient = new WeakReference<NetHandlerPlayClient>(netHandlerPlayClient);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user