Skip to content

Commit

Permalink
only sort notConsumed to the end, not other inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Jul 8, 2021
1 parent 4401321 commit 2f8d00f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/gregtech/api/recipes/Recipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ public Recipe(List<CountableIngredient> inputs, List<ItemStack> outputs, List<Ch
this.duration = duration;
this.EUt = EUt;
this.hidden = hidden;
//sort input elements in descending order (i.e not consumables inputs are last)
this.inputs.sort(Comparator.comparing(CountableIngredient::getCount).reversed());

//sort not consumables inputs to the end
this.inputs.sort((ing1, ing2) -> ing1.getCount() == 0 ? 1 : 0);
}

/**
Expand Down

0 comments on commit 2f8d00f

Please sign in to comment.