Fix JEI Altar recipe (#933)
This commit is contained in:
parent
f9185817a1
commit
a1eb8aad56
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,6 +19,7 @@ crash-reports/
|
||||||
/logs/
|
/logs/
|
||||||
/mods/
|
/mods/
|
||||||
/screenshots/
|
/screenshots/
|
||||||
|
/classes/
|
||||||
|
|
||||||
# File Extensions
|
# File Extensions
|
||||||
*.psd
|
*.psd
|
||||||
|
|
|
@ -2,11 +2,14 @@ package WayofTime.bloodmagic.compat.jei.altar;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.IRecipeCategory;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
||||||
|
@ -56,7 +59,6 @@ public class AltarRecipeCategory implements IRecipeCategory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||||
{
|
{
|
||||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0);
|
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0);
|
||||||
|
@ -65,7 +67,8 @@ public class AltarRecipeCategory implements IRecipeCategory
|
||||||
if (recipeWrapper instanceof AltarRecipeJEI)
|
if (recipeWrapper instanceof AltarRecipeJEI)
|
||||||
{
|
{
|
||||||
AltarRecipeJEI altarRecipeWrapper = (AltarRecipeJEI) recipeWrapper;
|
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());
|
recipeLayout.getItemStacks().set(OUTPUT_SLOT, altarRecipeWrapper.getOutputs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||||
public class AltarRecipeJEI extends BlankRecipeWrapper
|
public class AltarRecipeJEI extends BlankRecipeWrapper
|
||||||
{
|
{
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final Object input;
|
private final List<ItemStack> input;
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final ItemStack output;
|
private final ItemStack output;
|
||||||
|
@ -37,13 +37,13 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List getInputs()
|
public List<List<ItemStack>> getInputs()
|
||||||
{
|
{
|
||||||
return Collections.singletonList(input);
|
return Collections.singletonList(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List getOutputs()
|
public List<ItemStack> getOutputs()
|
||||||
{
|
{
|
||||||
return Collections.singletonList(output);
|
return Collections.singletonList(output);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue