mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
More tweaks to the mod sorting code
This commit is contained in:
1 parent
ece6290c19
commit
e3cd509b9a
3 files changed
+11
-6
No files matched your search
@@ -28,12 +28,17 @@ public class DummyModContainer implements ModContainer
|
||||
{
|
||||
private ModMetadata md;
|
||||
private ArtifactVersion processedVersion;
|
||||
private String label;
|
||||
|
||||
public DummyModContainer(ModMetadata md)
|
||||
{
|
||||
this.md = md;
|
||||
}
|
||||
|
||||
public DummyModContainer(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
public DummyModContainer()
|
||||
{
|
||||
}
|
||||
@@ -161,6 +166,6 @@ public class DummyModContainer implements ModContainer
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return md != null ? getModId() :"Unknown Dummy Container @" + System.identityHashCode(this);
|
||||
return md != null ? getModId() : "Dummy Container ("+label+") @" + System.identityHashCode(this);
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,10 @@ public class ModSorter
|
||||
{
|
||||
private DirectedGraph<ModContainer> modGraph;
|
||||
|
||||
private ModContainer beforeAll = new DummyModContainer();
|
||||
private ModContainer afterAll = new DummyModContainer();
|
||||
private ModContainer before = new DummyModContainer();
|
||||
private ModContainer after = new DummyModContainer();
|
||||
private ModContainer beforeAll = new DummyModContainer("BeforeAll");
|
||||
private ModContainer afterAll = new DummyModContainer("AfterAll");
|
||||
private ModContainer before = new DummyModContainer("Before");
|
||||
private ModContainer after = new DummyModContainer("After");
|
||||
|
||||
public ModSorter(List<ModContainer> modList, Map<String, ModContainer> nameLookup)
|
||||
{
|
||||
|
||||
@@ -183,7 +183,7 @@ public class TopologicalSort
|
||||
FMLLog.severe("Current sorted list : %s", sortedResult);
|
||||
FMLLog.severe("Visited set for this node : %s", visitedNodes);
|
||||
FMLLog.severe("Explored node set : %s", expandedNodes);
|
||||
FMLLog.severe("Likely cycle is in : %s", Sets.difference(expandedNodes, visitedNodes));
|
||||
FMLLog.severe("Likely cycle is in : %s", Sets.difference(visitedNodes, expandedNodes));
|
||||
throw new ModSortingException("There was a cycle detected in the input graph, sorting is not possible", node, visitedNodes);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user