Tie parent/child containers together again. Should close #96
This commit is contained in:
parent
9cd4ed0c91
commit
149a626e5a
1 changed files with 10 additions and 2 deletions
|
@ -27,6 +27,8 @@ import net.minecraft.src.Tessellator;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
|
||||
|
@ -52,8 +54,14 @@ public class GuiModList extends GuiScreen
|
|||
this.mods=new ArrayList<ModContainer>();
|
||||
FMLClientHandler.instance().addSpecialModEntries(mods);
|
||||
for (ModContainer mod : Loader.instance().getModList()) {
|
||||
if (mod.getMetadata()!=null && mod.getMetadata().parentMod != null) {
|
||||
continue;
|
||||
if (mod.getMetadata()!=null && !Strings.isNullOrEmpty(mod.getMetadata().parent)) {
|
||||
String parentMod = mod.getMetadata().parent;
|
||||
ModContainer parentContainer = Loader.instance().getIndexedModList().get(parentMod);
|
||||
if (parentContainer != null)
|
||||
{
|
||||
mod.getMetadata().parentMod = parentContainer;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
mods.add(mod);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue