mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
This commit is contained in:
1 parent
dd3c3a249e
commit
fde90973c3
1 file changed
+11
-5
@@ -157,11 +157,17 @@ 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;
|
||||
if (r2.getRecipeSize() < r1.getRecipeSize()) return -1;
|
||||
if (r2.getRecipeSize() > r1.getRecipeSize()) return 1;
|
||||
return getPriority(r2) - getPriority(r1); // high priority value first!
|
||||
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();
|
||||
|
||||
Reference in new issue
Block a user