File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/gregtech/common/mui/widget/workbench Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import com .cleanroommc .modularui .api .drawable .IKey ;
12
12
import com .cleanroommc .modularui .api .widget .Interactable ;
13
+ import com .cleanroommc .modularui .integration .jei .JeiIngredientProvider ;
13
14
import com .cleanroommc .modularui .screen .RichTooltip ;
14
15
import com .cleanroommc .modularui .screen .viewport .ModularGuiContext ;
15
16
import com .cleanroommc .modularui .theme .WidgetTheme ;
16
17
import com .cleanroommc .modularui .utils .MouseData ;
17
18
import com .cleanroommc .modularui .widget .Widget ;
18
19
import org .jetbrains .annotations .NotNull ;
20
+ import org .jetbrains .annotations .Nullable ;
19
21
20
- public class RecipeMemorySlot extends Widget <RecipeMemorySlot > implements Interactable {
22
+ public class RecipeMemorySlot extends Widget <RecipeMemorySlot > implements Interactable , JeiIngredientProvider {
21
23
22
24
private final CraftingRecipeMemory memory ;
23
25
private final int index ;
@@ -87,4 +89,10 @@ public Result onMousePressed(int mouseButton) {
87
89
88
90
return Result .ACCEPT ;
89
91
}
92
+
93
+ @ Override
94
+ public @ Nullable Object getIngredient () {
95
+ if (!this .memory .hasRecipe (this .index )) return null ;
96
+ return this .memory .getRecipeOutputAtIndex (this .index );
97
+ }
90
98
}
You can’t perform that action at this time.
0 commit comments