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