Commit Graph

3 Commits

Author SHA1 Message Date
cpw f83500db11
Its 2019. Update licence headers to match.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 17:57:03 -05:00
liach c01b336095 Improves topological sort
This can be used for mod sorting, dependencies between registries, etc.
e.g. https://github.com/MinecraftForge/MinecraftForge/pull/4694#issuecomment-412520302

New features:
Now accepts guava graph
Performance improvement: no longer reverse the graph; changed dfs to bfs
Accepets a comparator for secondary order, e.g. natural order, index by map
Now properly reports all cycles in a graph with Tarjan's strongly connected component algorithm
Adds a test to prove the validity of the sort and cycle detection
Modified build.gradle for test source directory and dependencies

Mod loading changes:
Sort mod file info instead of suppliers (we don't have suppliers instances)
Moves cycle error reporting out of topological sort and into mod sorter
Prevent mod file dependencies between mods that share the same file

Signed-off-by: liach <liach@users.noreply.github.com>
2019-01-21 03:06:27 +00:00
cpw 48846bc0ba separated fmllauncher code from main forge mod code. This enables much
stronger classloader separation between the two sides. Forge now
loads as a regular mod.

Still needs a bunch of debugging, but structure looks good and game loads
in forge dev.
2018-12-31 16:34:33 -05:00
Renamed from src/main/java/net/minecraftforge/fml/common/toposort/TopologicalSort.java (Browse further)