JEI support for Blood Orb recipe type
We can now move all the recipes over to Shape(d/less)BloodOrbRecipe
This commit is contained in:
parent
65dd24b19b
commit
af193c3e5b
9 changed files with 384 additions and 14 deletions
|
@ -105,9 +105,15 @@ public class ShapedBloodOrbRecipe implements IRecipe
|
|||
// If the item is an instanceof IBloodOrb then save the level of
|
||||
// the orb.
|
||||
if (in instanceof ItemStack)
|
||||
itemMap.put(chr, ((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel(((ItemStack) in).getItemDamage()));
|
||||
else
|
||||
itemMap.put(chr, ((IBloodOrb) in).getOrbLevel(((ItemStack) in).getItemDamage()));
|
||||
{
|
||||
ItemStack inStack = (ItemStack) in;
|
||||
tier = ((IBloodOrb) inStack.getItem()).getOrbLevel(inStack.getItemDamage());
|
||||
itemMap.put(chr, tier);
|
||||
} else
|
||||
{
|
||||
tier = ((IBloodOrb) in).getOrbLevel(0);
|
||||
itemMap.put(chr, tier);
|
||||
}
|
||||
} else if (in instanceof ItemStack)
|
||||
{
|
||||
itemMap.put(chr, ((ItemStack) in).copy());
|
||||
|
@ -238,7 +244,6 @@ public class ShapedBloodOrbRecipe implements IRecipe
|
|||
if (slot != null && slot.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
IBloodOrb orb = (IBloodOrb) slot.getItem();
|
||||
tier = (Integer) target;
|
||||
if (orb.getOrbLevel(slot.getItemDamage()) < (Integer) target)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -40,13 +40,23 @@ public class ShapelessBloodOrbRecipe implements IRecipe
|
|||
output = result.copy();
|
||||
for (Object in : recipe)
|
||||
{
|
||||
if (in instanceof ItemStack)
|
||||
if (in instanceof IBloodOrb || (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb))
|
||||
{
|
||||
if (((ItemStack) in).getItem() instanceof IBloodOrb)
|
||||
// If the item is an instanceof IBloodOrb then save the level of
|
||||
// the orb.
|
||||
if (in instanceof ItemStack)
|
||||
{
|
||||
input.add(((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel(((ItemStack) in).getItemDamage()));
|
||||
ItemStack inStack = (ItemStack) in;
|
||||
tier = ((IBloodOrb) inStack.getItem()).getOrbLevel(inStack.getItemDamage());
|
||||
input.add(tier);
|
||||
} else
|
||||
input.add(((ItemStack) in).copy());
|
||||
{
|
||||
tier = ((IBloodOrb) in).getOrbLevel(0);
|
||||
input.add(tier);
|
||||
}
|
||||
}else if (in instanceof ItemStack)
|
||||
{
|
||||
input.add(((ItemStack) in).copy());
|
||||
} else if (in instanceof Item)
|
||||
{
|
||||
input.add(new ItemStack((Item) in));
|
||||
|
@ -134,7 +144,6 @@ public class ShapelessBloodOrbRecipe implements IRecipe
|
|||
if (slot.getItem() instanceof IBloodOrb)
|
||||
{
|
||||
IBloodOrb orb = (IBloodOrb) slot.getItem();
|
||||
tier = (Integer) next;
|
||||
if (orb.getOrbLevel(slot.getItemDamage()) < (Integer) next)
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue