diff --git a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java index b4483c73b..5424667b6 100644 --- a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java +++ b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeCategory.java @@ -12,7 +12,6 @@ import mekanism.client.gui.element.GuiSlot; import mekanism.client.gui.element.GuiSlot.SlotOverlay; import mekanism.client.gui.element.GuiSlot.SlotType; import mekanism.client.jei.BaseRecipeCategory; -import mekanism.client.render.MekanismRenderer; import mekanism.common.recipe.machines.MetallurgicInfuserRecipe; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; @@ -22,11 +21,9 @@ import mezz.jei.api.gui.IGuiItemStackGroup; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.recipe.IRecipeWrapper; -import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -34,9 +31,6 @@ import java.util.Map; public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory { private final IDrawable background; - - @Nullable - private MetallurgicInfuserRecipe tempRecipe; public MetallurgicInfuserRecipeCategory(IGuiHelper helper) { @@ -87,21 +81,6 @@ public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory return ret; } - @Override - public void drawExtras(Minecraft minecraft) - { - super.drawExtras(minecraft); - - if(tempRecipe == null) - { - return; - } - - InfuseType type = tempRecipe.getInput().infuse.type; - changeTexture(MekanismRenderer.getBlocksTexture()); - drawTexturedRectFromIcon(2, 2, type.sprite, 4, 52); - } - @Override public IDrawable getBackground() { @@ -116,7 +95,7 @@ public class MetallurgicInfuserRecipeCategory extends BaseRecipeCategory return; } - tempRecipe = ((MetallurgicInfuserRecipeWrapper)recipeWrapper).getRecipe(); + MetallurgicInfuserRecipe tempRecipe = ((MetallurgicInfuserRecipeWrapper)recipeWrapper).getRecipe(); IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); diff --git a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeWrapper.java b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeWrapper.java index 6717b0283..83f935803 100644 --- a/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeWrapper.java +++ b/src/main/java/mekanism/client/jei/machine/other/MetallurgicInfuserRecipeWrapper.java @@ -1,8 +1,10 @@ package mekanism.client.jei.machine.other; +import mekanism.client.render.MekanismRenderer; import mekanism.common.recipe.machines.MetallurgicInfuserRecipe; import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.recipe.IRecipeWrapper; +import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import java.util.Arrays; @@ -33,4 +35,12 @@ public class MetallurgicInfuserRecipeWrapper implements IRecipeWrapper { return recipe; } + + @Override + public void drawInfo(Minecraft mc, int recipeWidth, int recipeHeight, int mouseX, int mouseY) { + if (mc.currentScreen != null) { + mc.renderEngine.bindTexture(MekanismRenderer.getBlocksTexture()); + mc.currentScreen.drawTexturedModalRect(2, 2, recipe.getInput().infuse.type.sprite, 4, 52); + } + } }