Fix JEI support for orb recipes with more than 1 orb

This commit is contained in:
Nicholas Ignoffo 2016-05-01 09:10:12 -07:00
parent 8283047bf1
commit 08f865ba8a
2 changed files with 2 additions and 28 deletions

View file

@ -31,23 +31,10 @@ public class ShapedOrbRecipeJEI implements IShapedCraftingRecipeWrapper
public ShapedOrbRecipeJEI(@Nonnull List input, int tier, @Nonnull ItemStack output)
{
ArrayList inputList = new ArrayList(input);
int replaceIndex = 0;
Object toReplace = null;
for (Object object : inputList)
{
if (object instanceof Integer)
{
replaceIndex = inputList.indexOf(object);
toReplace = object;
}
}
if (toReplace != null)
{
inputList.remove(replaceIndex);
inputList.add(replaceIndex, OrbRegistry.getOrbsDownToTier((Integer) toReplace));
}
inputList.set(inputList.indexOf(object), OrbRegistry.getOrbsDownToTier((Integer) object));
this.inputs = inputList;
this.tier = tier;

View file

@ -31,23 +31,10 @@ public class ShapelessOrbRecipeJEI implements ICraftingRecipeWrapper
public ShapelessOrbRecipeJEI(@Nonnull List input, int tier, @Nonnull ItemStack output)
{
ArrayList inputList = new ArrayList(input);
int replaceIndex = 0;
Object toReplace = null;
for (Object object : inputList)
{
if (object instanceof Integer)
{
replaceIndex = inputList.indexOf(object);
toReplace = object;
}
}
if (toReplace != null)
{
inputList.remove(replaceIndex);
inputList.add(replaceIndex, OrbRegistry.getOrbsDownToTier((Integer) toReplace));
}
inputList.set(inputList.indexOf(object), OrbRegistry.getOrbsDownToTier((Integer) object));
this.inputs = inputList;
this.tier = tier;