aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/nei/NEIRecipeInfo.java
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2022-12-30 20:29:59 +0900
committerGitHub <noreply@github.com>2022-12-30 12:29:59 +0100
commit910437230b18d15a61a02cb31ce95f20a63dcade (patch)
treeefde15d87baa33cc6eb563d3c027fb8a29f9cbb5 /src/main/java/gregtech/nei/NEIRecipeInfo.java
parentac802e0abae29b3f7d16dc6134a384200bc791da (diff)
downloadGT5-Unofficial-910437230b18d15a61a02cb31ce95f20a63dcade.tar.gz
GT5-Unofficial-910437230b18d15a61a02cb31ce95f20a63dcade.tar.bz2
GT5-Unofficial-910437230b18d15a61a02cb31ce95f20a63dcade.zip
Improve NEI customizability (#1583)
* Move descriptions to recipemap * Move tooltips to recipemap * Move overlays to recipemap * Use shared code for generating grid positions * 2 fluid inputs for freezer recipes * Add deprecation javadoc
Diffstat (limited to 'src/main/java/gregtech/nei/NEIRecipeInfo.java')
-rw-r--r--src/main/java/gregtech/nei/NEIRecipeInfo.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/gregtech/nei/NEIRecipeInfo.java b/src/main/java/gregtech/nei/NEIRecipeInfo.java
new file mode 100644
index 0000000000..e19ff6f2ba
--- /dev/null
+++ b/src/main/java/gregtech/nei/NEIRecipeInfo.java
@@ -0,0 +1,50 @@
+package gregtech.nei;
+
+import gregtech.api.util.GT_Recipe;
+import gregtech.common.power.Power;
+
+/**
+ * Holds info used for drawing descriptions on NEI.
+ */
+public class NEIRecipeInfo {
+
+ /**
+ * Recipe to show description.
+ */
+ public final GT_Recipe recipe;
+
+ /**
+ * RecipeMap the recipe belongs to.
+ */
+ public final GT_Recipe.GT_Recipe_Map recipeMap;
+
+ /**
+ * Recipe object for NEI.
+ */
+ public final GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe;
+
+ /**
+ * When user looks up usage for machine, NEI will show all the recipes that the machine can process,
+ * taking tier of the machine into consideration.
+ * This object can be used to show info around overclocked EU/t and duration.
+ */
+ public final Power power;
+
+ /**
+ * Current Y position for drawing description.
+ */
+ public int yPos;
+
+ public NEIRecipeInfo(
+ GT_Recipe recipe,
+ GT_Recipe.GT_Recipe_Map recipeMap,
+ GT_NEI_DefaultHandler.CachedDefaultRecipe neiCachedRecipe,
+ Power power,
+ int descriptionYOffset) {
+ this.recipe = recipe;
+ this.recipeMap = recipeMap;
+ this.neiCachedRecipe = neiCachedRecipe;
+ this.power = power;
+ this.yPos = descriptionYOffset;
+ }
+}