Tie parent/child containers together again. Should close #96

This commit is contained in:
Christian 2012-09-15 15:58:20 -04:00
parent 9cd4ed0c91
commit 149a626e5a

View file

@ -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);
}