CLASS net/minecraft/class_6496 net/minecraft/util/TopologicalSorts COMMENT Utilities to perform a topological sort. METHOD method_37951 sort (Ljava/util/Map;Ljava/util/Set;Ljava/util/Set;Ljava/util/function/Consumer;Ljava/lang/Object;)Z COMMENT Performs a topological sort recursively through a reverse DFS. The COMMENT results are passed to the consumer in reverse order, where each element COMMENT is guaranteed to be passed before any of its predecessors (dependencies). COMMENT When multiple orders are valid, the results will first trace along earlier COMMENT returned successors in the successor set iteration for each element. COMMENT COMMENT @return {@code true} if the sort ends up in a loop, or {@code false} for COMMENT a successful sort ARG 0 successors COMMENT the map holding information on successor (dependents) of each element ARG 1 visited COMMENT elements that already iterated all their successors ARG 2 visiting COMMENT elements that are still iterating their successors ARG 3 reversedOrderConsumer COMMENT accepts sorted results in reverse order; each element is passed only COMMENT before any of its predecessors (dependencies) is, or after all its COMMENT successors (dependents) are passed ARG 4 now COMMENT the starting or current element