2015-11-28 23:52:06 -08:00
|
|
|
package WayofTime.bloodmagic.compat.jei.altar;
|
|
|
|
|
2016-01-02 14:34:15 -08:00
|
|
|
import WayofTime.bloodmagic.api.orb.IBloodOrb;
|
2015-11-28 23:52:06 -08:00
|
|
|
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
import javax.annotation.Nonnull;
|
2015-12-01 21:14:26 -08:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
2015-11-28 23:52:06 -08:00
|
|
|
|
2015-12-30 15:34:40 -05:00
|
|
|
public class AltarRecipeMaker
|
|
|
|
{
|
2015-11-28 23:52:06 -08:00
|
|
|
@Nonnull
|
2015-12-30 15:34:40 -05:00
|
|
|
public static List<AltarRecipeJEI> getRecipes()
|
|
|
|
{
|
2015-12-02 19:27:28 -08:00
|
|
|
Map<ItemStack, AltarRecipeRegistry.AltarRecipe> altarMap = AltarRecipeRegistry.getRecipes();
|
2015-11-28 23:52:06 -08:00
|
|
|
|
|
|
|
ArrayList<AltarRecipeJEI> recipes = new ArrayList<AltarRecipeJEI>();
|
|
|
|
|
2015-12-30 15:34:40 -05:00
|
|
|
for (Map.Entry<ItemStack, AltarRecipeRegistry.AltarRecipe> itemStackAltarRecipeEntry : altarMap.entrySet())
|
|
|
|
{
|
2016-01-02 14:34:15 -08:00
|
|
|
if (!(itemStackAltarRecipeEntry.getKey().getItem() instanceof IBloodOrb))
|
2016-01-01 10:34:17 +01:00
|
|
|
{
|
2016-01-02 14:34:15 -08:00
|
|
|
// Make sure input is not a Blood Orb. If it is, the recipe is for a filling orb, and we don't want that.
|
2015-11-28 23:52:06 -08:00
|
|
|
ItemStack input = itemStackAltarRecipeEntry.getKey();
|
|
|
|
ItemStack output = itemStackAltarRecipeEntry.getValue().getOutput();
|
|
|
|
int requiredTier = itemStackAltarRecipeEntry.getValue().getMinTier().toInt();
|
|
|
|
int requiredLP = itemStackAltarRecipeEntry.getValue().getSyphon();
|
|
|
|
|
|
|
|
AltarRecipeJEI recipe = new AltarRecipeJEI(input, output, requiredTier, requiredLP);
|
|
|
|
recipes.add(recipe);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return recipes;
|
|
|
|
}
|
|
|
|
}
|