This commit is contained in:
parent
dd3c3a249e
commit
fde90973c3
1 changed files with 11 additions and 5 deletions
|
@ -157,12 +157,18 @@ public class RecipeSorter implements Comparator<IRecipe>
|
|||
{
|
||||
Category c1 = getCategory(r1);
|
||||
Category c2 = getCategory(r2);
|
||||
if (c1 == SHAPELESS && c2 == SHAPED) return 1;
|
||||
if (c1 == SHAPED && c2 == SHAPELESS) return -1;
|
||||
int categoryComparison = -c1.compareTo(c2);
|
||||
if (categoryComparison != 0)
|
||||
{
|
||||
return categoryComparison;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (r2.getRecipeSize() < r1.getRecipeSize()) return -1;
|
||||
if (r2.getRecipeSize() > r1.getRecipeSize()) return 1;
|
||||
return getPriority(r2) - getPriority(r1); // high priority value first!
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<Class<?>> warned = Sets.newHashSet();
|
||||
public static void sortCraftManager()
|
||||
|
|
Loading…
Reference in a new issue