package meltery.compat.jei;


import com.google.common.collect.ImmutableList;

import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;

import java.awt.*;
import java.util.List;

import javax.annotation.Nonnull;

import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeWrapper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import slimeknights.tconstruct.library.TinkerRegistry;
import slimeknights.tconstruct.library.smeltery.MeltingRecipe;

public class SmeltingRecipeWrapper extends BlankRecipeWrapper {

    protected final List<ItemStack> inputs;
    protected final List<FluidStack> outputs;
    protected final int temperature;
    protected final List<FluidStack> fuels;

    public SmeltingRecipeWrapper(MeltingRecipe recipe) {
        this.inputs = recipe.input.getInputs();
        this.outputs = ImmutableList.of(recipe.getResult());
        this.temperature = recipe.getTemperature();

        ImmutableList.Builder<FluidStack> builder = ImmutableList.builder();
        for(FluidStack fs : TinkerRegistry.getSmelteryFuels()) {
            if(fs.getFluid().getTemperature(fs) >= temperature) {
                fs = fs.copy();
                fs.amount = 1000;
                builder.add(fs);
            }
        }
        fuels = builder.build();
    }

    @Override
    public void getIngredients(IIngredients ingredients) {
        ingredients.setInputs(ItemStack.class, inputs);
        ingredients.setOutputs(FluidStack.class, outputs);
    }

    @SideOnly(Side.CLIENT)
    @Override
    public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
        String tmpStr = String.valueOf(temperature) + "\u00B0";
        int x = 80 - minecraft.fontRenderer.getStringWidth(tmpStr) / 2;
        minecraft.fontRenderer.drawString(tmpStr, x, 10, Color.gray.getRGB());
    }
}
@@ -67,24 +67,116 @@
 utableList;%0A
+import mezz.jei.api.ingredients.IIngredients;%0Aimport mezz.jei.api.recipe.BlankRecipeWrapper;
 %0Aimport net.
@@ -288,277 +288,8 @@
 ack;
-%0A%0Aimport java.awt.*;%0Aimport java.util.List;%0A%0Aimport javax.annotation.Nonnull;%0A%0Aimport mezz.jei.api.ingredients.IIngredients;%0Aimport mezz.jei.api.recipe.BlankRecipeWrapper;%0Aimport net.minecraftforge.fml.relauncher.Side;%0Aimport net.minecraftforge.fml.relauncher.SideOnly;
 %0Aimp
@@ -404,16 +404,73 @@
 ecipe;%0A%0A
+import javax.annotation.Nonnull;%0Aimport java.util.List;%0A%0A
 public c
@@ -1487,49 +1487,8 @@
  %7D%0A%0A
-    @SideOnly(Side.CLIENT)%0A    @Override%0A
     
@@ -1603,223 +1603,8 @@
 ) %7B%0A
-        String tmpStr = String.valueOf(temperature) + %22%5Cu00B0%22;%0A        int x = 80 - minecraft.fontRenderer.getStringWidth(tmpStr) / 2;%0A        minecraft.fontRenderer.drawString(tmpStr, x, 10, Color.gray.getRGB());%0A
     

Fix JEI