OreDict Altar Recipes!
OreDict support for altar and alchemy array recipes! Changed the alchemy array JEI image Recipe modularizations Fix Like this? Tehnut patch Change to List<ItemStack>
This commit is contained in:
parent
f9cb1a08ba
commit
800ffa213b
11 changed files with 249 additions and 102 deletions
|
@ -7,7 +7,6 @@ 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;
|
||||
|
@ -61,16 +60,15 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
{
|
||||
|
||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5);
|
||||
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 50, 5);
|
||||
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3);
|
||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5);
|
||||
|
||||
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI)
|
||||
{
|
||||
AlchemyArrayCraftingRecipeJEI alchemyArrayWrapper = (AlchemyArrayCraftingRecipeJEI) recipeWrapper;
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, (ItemStack) alchemyArrayWrapper.getInputs().get(0));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, (ItemStack) alchemyArrayWrapper.getInputs().get(1));
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, alchemyArrayWrapper.getInputs().subList(0, alchemyArrayWrapper.getInputs().size() - 1));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, alchemyArrayWrapper.getCatalyst());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, alchemyArrayWrapper.getOutputs());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,22 +13,31 @@ import net.minecraft.item.ItemStack;
|
|||
public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
@Nonnull
|
||||
private final List<ItemStack> inputs;
|
||||
private final Object inputs;
|
||||
|
||||
@Nullable
|
||||
private final ItemStack catalyst;
|
||||
|
||||
@Nonnull
|
||||
private final ItemStack output;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public AlchemyArrayCraftingRecipeJEI(@Nonnull ItemStack input, @Nullable ItemStack catalyst, @Nonnull ItemStack output)
|
||||
public AlchemyArrayCraftingRecipeJEI(@Nonnull List<ItemStack> input, @Nullable ItemStack catalyst, @Nonnull ItemStack output)
|
||||
{
|
||||
this.inputs = Arrays.asList(input, catalyst);
|
||||
this.inputs = input;
|
||||
this.catalyst = catalyst;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getInputs()
|
||||
{
|
||||
return inputs;
|
||||
return Arrays.asList(inputs, catalyst);
|
||||
}
|
||||
|
||||
public ItemStack getCatalyst()
|
||||
{
|
||||
return catalyst;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,13 +19,13 @@ public class AlchemyArrayCraftingRecipeMaker
|
|||
@Nonnull
|
||||
public static List<AlchemyArrayCraftingRecipeJEI> getRecipes()
|
||||
{
|
||||
Map<ItemStackWrapper, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes();
|
||||
Map<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes();
|
||||
|
||||
ArrayList<AlchemyArrayCraftingRecipeJEI> recipes = new ArrayList<AlchemyArrayCraftingRecipeJEI>();
|
||||
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet())
|
||||
for (Map.Entry<List<ItemStack>, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet())
|
||||
{
|
||||
ItemStack input = itemStackAlchemyArrayRecipeEntry.getValue().getInputStack();
|
||||
List<ItemStack> input = itemStackAlchemyArrayRecipeEntry.getValue().getInput();
|
||||
BiMap<ItemStackWrapper, AlchemyArrayEffect> catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap;
|
||||
|
||||
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue