
Can't use images loaded with resource loader
AlexIIL opened this issue ยท 1 comments
Probable fix: ask lumien to change resource loader to accept loading before the mod is loaded.
NormalResourceLoader normalResourceLoader;
OverridingResourceLoader overridingResourceLoader;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
this.normalResourceLoader = new NormalResourceLoader();
this.overridingResourceLoader = new OverridingResourceLoader();
Minecraft.func_71410_x().field_110449_ao.add(this.normalResourceLoader);
}
public static void insertForcedPack(ArrayList resourcePackList)
{
if (INSTANCE.overridingResourceLoader != null)
{
resourcePackList.add(INSTANCE.overridingResourceLoader);
}
}
to:
static NormalResourceLoader normalResourceLoader;
static OverridingResourceLoader overridingResourceLoader;
static boolean hasAdded = false;
public static void insertForcedPack(ArrayList resourcePackList)
{
if (overridingResourceLoader == null) {
normalResourceLoader = new NormalResourceLoader();
overridingResourceLoader = new OverridingResourceLoader();
}
if (!hasAdded && Minecraft.func_71410_x() != null) {
Minecraft.func_71410_x().field_110449_ao.add(this.normalResourceLoader);
}
resourcePackList.add(overridingResourceLoader);
}
However, this needs to be tested properly :)