aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2022-10-31 11:20:25 +0100
committerGitHub <noreply@github.com>2022-10-31 11:20:25 +0100
commit6814410aec2fc2fd3b214dbb84aa502ffbbb8ac4 (patch)
tree9f3f47ea5b7c5b180d36a5dc3717cf3dd9656e0c
parente9c4e044c076250fcde6ddbdea1ea8c7f9cbf43d (diff)
downloadNotEnoughUpdates-6814410aec2fc2fd3b214dbb84aa502ffbbb8ac4.tar.gz
NotEnoughUpdates-6814410aec2fc2fd3b214dbb84aa502ffbbb8ac4.tar.bz2
NotEnoughUpdates-6814410aec2fc2fd3b214dbb84aa502ffbbb8ac4.zip
Sort recipe tabs in GuiItemRecipe (#410)
Recipe tabs in GuiItemRecipe are now sorted according to declaration in the RecipeType enum
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
index a0a5e71a..57732583 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
@@ -45,6 +45,7 @@ import org.lwjgl.input.Mouse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -87,6 +88,7 @@ public class GuiItemRecipe extends GuiScreen {
if (!tabs.contains(recipe.getType()))
tabs.add(recipe.getType());
}
+ tabs.sort(Comparator.naturalOrder());
changeRecipe(0, 0);
}