Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Commit

Permalink
Fix JEI Altar recipe (WayofTime#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz authored and TehNut committed Sep 26, 2016
1 parent f918581 commit a1eb8aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ crash-reports/
/logs/
/mods/
/screenshots/
/classes/

# File Extensions
*.psd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

import javax.annotation.Nonnull;

import java.util.List;

import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.recipe.IRecipeCategory;
import mezz.jei.api.recipe.IRecipeWrapper;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
Expand Down Expand Up @@ -56,7 +59,6 @@ public void drawAnimations(Minecraft minecraft)
}

@Override
@SuppressWarnings("unchecked")
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
{
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0);
Expand All @@ -65,7 +67,8 @@ public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapp
if (recipeWrapper instanceof AltarRecipeJEI)
{
AltarRecipeJEI altarRecipeWrapper = (AltarRecipeJEI) recipeWrapper;
recipeLayout.getItemStacks().set(INPUT_SLOT, altarRecipeWrapper.getInputs());
List<List<ItemStack>> inputs = altarRecipeWrapper.getInputs();
recipeLayout.getItemStacks().set(INPUT_SLOT, inputs.get(0));
recipeLayout.getItemStacks().set(OUTPUT_SLOT, altarRecipeWrapper.getOutputs());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public class AltarRecipeJEI extends BlankRecipeWrapper
{
@Nonnull
private final Object input;
private final List<ItemStack> input;

@Nonnull
private final ItemStack output;
Expand All @@ -37,13 +37,13 @@ public AltarRecipeJEI(@Nonnull List<ItemStack> input, @Nonnull ItemStack output,
}

@Override
public List getInputs()
public List<List<ItemStack>> getInputs()
{
return Collections.singletonList(input);
}

@Override
public List getOutputs()
public List<ItemStack> getOutputs()
{
return Collections.singletonList(output);
}
Expand Down

0 comments on commit a1eb8aa

Please sign in to comment.