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 1010
1111import com .cleanroommc .modularui .api .drawable .IKey ;
1212import com .cleanroommc .modularui .api .widget .Interactable ;
13+ import com .cleanroommc .modularui .integration .jei .JeiIngredientProvider ;
1314import com .cleanroommc .modularui .screen .RichTooltip ;
1415import com .cleanroommc .modularui .screen .viewport .ModularGuiContext ;
1516import com .cleanroommc .modularui .theme .WidgetTheme ;
1617import com .cleanroommc .modularui .utils .MouseData ;
1718import com .cleanroommc .modularui .widget .Widget ;
1819import org .jetbrains .annotations .NotNull ;
20+ import org .jetbrains .annotations .Nullable ;
1921
20- public class RecipeMemorySlot extends Widget <RecipeMemorySlot > implements Interactable {
22+ public class RecipeMemorySlot extends Widget <RecipeMemorySlot > implements Interactable , JeiIngredientProvider {
2123
2224 private final CraftingRecipeMemory memory ;
2325 private final int index ;
@@ -87,4 +89,10 @@ public Result onMousePressed(int mouseButton) {
8789
8890 return Result .ACCEPT ;
8991 }
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+ }
9098}
You can’t perform that action at this time.
0 commit comments