Initial stab at 1.11
About halfway.
This commit is contained in:
parent
ce52aea512
commit
00d6f8eb46
157 changed files with 1036 additions and 1554 deletions
|
@ -1,12 +1,15 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyArray;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
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;
|
||||
|
@ -50,14 +53,15 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5);
|
||||
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 29, 3);
|
||||
|
@ -66,9 +70,9 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI)
|
||||
{
|
||||
AlchemyArrayCraftingRecipeJEI alchemyArrayWrapper = (AlchemyArrayCraftingRecipeJEI) recipeWrapper;
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, alchemyArrayWrapper.getInputs());
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, ingredients.getInputs(ItemStack.class).get(0));
|
||||
recipeLayout.getItemStacks().set(CATALYST_SLOT, alchemyArrayWrapper.getCatalyst());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, alchemyArrayWrapper.getOutputs());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<Alchemy
|
|||
return AlchemyArrayCraftingRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
@ -27,22 +28,14 @@ public class AlchemyArrayCraftingRecipeJEI extends BlankRecipeWrapper
|
|||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getInputs()
|
||||
{
|
||||
return inputs;
|
||||
}
|
||||
|
||||
public ItemStack getCatalyst()
|
||||
{
|
||||
return catalyst;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(output);
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setOutputs(ItemStack.class, Collections.singletonList(output));
|
||||
ingredients.setInputs(ItemStack.class, inputs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -63,15 +62,16 @@ public class AlchemyTableRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
public IDrawable getIcon()
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
@ -90,9 +90,9 @@ public class AlchemyTableRecipeCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AlchemyTableRecipeJEI)
|
||||
{
|
||||
AlchemyTableRecipeJEI recipe = (AlchemyTableRecipeJEI) recipeWrapper;
|
||||
guiItemStacks.set(ORB_SLOT, (ArrayList<ItemStack>) recipe.getInputs().get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs());
|
||||
craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2);
|
||||
guiItemStacks.set(ORB_SLOT, ingredients.getInputs(ItemStack.class).get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class), 3, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AlchemyTableRecipeHandler implements IRecipeHandler<AlchemyTableRec
|
|||
return AlchemyTableRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlchemyTableRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe;
|
||||
import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
||||
|
@ -20,32 +15,17 @@ public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|||
@Getter
|
||||
private AlchemyTableRecipe recipe;
|
||||
|
||||
// @Getter
|
||||
// private ArrayList<ItemStack> validGems = new ArrayList<ItemStack>();
|
||||
|
||||
public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<Collection> getInputs()
|
||||
{
|
||||
ArrayList<Collection> ret = new ArrayList<Collection>();
|
||||
ret.add(recipe.getInput());
|
||||
ret.add(OrbRegistry.getOrbsDownToTier(recipe.getTierRequired()));
|
||||
return ret;
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
// ingredients.setInputLists(ItemStack.class, Lists.<ItemStack>newArrayList(recipe.getInput(), OrbRegistry.getOrbsDownToTier(recipe.getTierRequired())));
|
||||
ingredients.setOutput(ItemStack.class, recipe.getRecipeOutput(new ArrayList<ItemStack>()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(recipe.getRecipeOutput(new ArrayList<ItemStack>()));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -54,8 +34,7 @@ public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|||
{
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained()));
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
||||
return ret;
|
||||
}
|
||||
return null;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.altar;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -52,14 +54,14 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
{
|
||||
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 31, 0);
|
||||
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 125, 30);
|
||||
|
@ -67,9 +69,9 @@ public class AltarRecipeCategory implements IRecipeCategory
|
|||
if (recipeWrapper instanceof AltarRecipeJEI)
|
||||
{
|
||||
AltarRecipeJEI altarRecipeWrapper = (AltarRecipeJEI) recipeWrapper;
|
||||
List<List<ItemStack>> inputs = altarRecipeWrapper.getInputs();
|
||||
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
|
||||
recipeLayout.getItemStacks().set(INPUT_SLOT, inputs.get(0));
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, altarRecipeWrapper.getOutputs());
|
||||
recipeLayout.getItemStacks().set(OUTPUT_SLOT, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class AltarRecipeHandler implements IRecipeHandler<AltarRecipeJEI>
|
|||
return AltarRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ALTAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AltarRecipeJEI recipe)
|
||||
{
|
||||
|
|
|
@ -2,13 +2,12 @@ package WayofTime.bloodmagic.compat.jei.altar;
|
|||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -37,18 +36,11 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<List<ItemStack>> getInputs()
|
||||
{
|
||||
return Collections.singletonList(input);
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInputs(ItemStack.class, input);
|
||||
ingredients.setOutput(ItemStack.class, output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
return Collections.singletonList(output);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -57,9 +49,8 @@ public class AltarRecipeJEI extends BlankRecipeWrapper
|
|||
{
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.consumptionRate", consumptionRate));
|
||||
ret.add(TextHelper.localize("jei.BloodMagic.recipe.drainRate", drainRate));
|
||||
return ret;
|
||||
}
|
||||
return null;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import mezz.jei.api.gui.ICraftingGridHelper;
|
||||
import mezz.jei.api.gui.IDrawable;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -63,15 +62,15 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void drawAnimations(Minecraft minecraft)
|
||||
{
|
||||
|
||||
public IDrawable getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
|
||||
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper, IIngredients ingredients)
|
||||
{
|
||||
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
|
||||
|
||||
|
@ -89,10 +88,9 @@ public class ArmourDowngradeRecipeCategory implements IRecipeCategory
|
|||
|
||||
if (recipeWrapper instanceof ArmourDowngradeRecipeJEI)
|
||||
{
|
||||
ArmourDowngradeRecipeJEI recipe = (ArmourDowngradeRecipeJEI) recipeWrapper;
|
||||
guiItemStacks.set(KEY_SLOT, (ArrayList<ItemStack>) recipe.getInputs().get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, recipe.getOutputs());
|
||||
craftingGridHelper.setInput(guiItemStacks, (List) recipe.getInputs().get(0), 3, 2);
|
||||
guiItemStacks.set(KEY_SLOT, ingredients.getInputs(ItemStack.class).get(1));
|
||||
craftingGridHelper.setOutput(guiItemStacks, ingredients.getOutputs(ItemStack.class).get(0));
|
||||
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class), 3, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,6 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
return ArmourDowngradeRecipeJEI.class;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(ArmourDowngradeRecipeJEI recipe)
|
||||
|
@ -40,6 +32,6 @@ public class ArmourDowngradeRecipeHandler implements IRecipeHandler<ArmourDowngr
|
|||
@Override
|
||||
public boolean isRecipeValid(@Nonnull ArmourDowngradeRecipeJEI recipe)
|
||||
{
|
||||
return recipe.getInputs().get(0).size() > 0 && recipe.getOutputs().size() > 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,65 +1,28 @@
|
|||
package WayofTime.bloodmagic.compat.jei.armourDowngrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.recipe.LivingArmourDowngradeRecipe;
|
||||
import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class ArmourDowngradeRecipeJEI extends BlankRecipeWrapper
|
||||
{
|
||||
@Getter
|
||||
private LivingArmourDowngradeRecipe recipe;
|
||||
|
||||
// @Getter
|
||||
// private ArrayList<ItemStack> validGems = new ArrayList<ItemStack>();
|
||||
|
||||
public ArmourDowngradeRecipeJEI(LivingArmourDowngradeRecipe recipe)
|
||||
{
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<Collection> getInputs()
|
||||
{
|
||||
ArrayList<Collection> ret = new ArrayList<Collection>();
|
||||
ret.add(recipe.getInput());
|
||||
ret.add(Lists.newArrayList(recipe.getKey()));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public List<ItemStack> getOutputs()
|
||||
{
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
// TODO - inputs
|
||||
ItemStack upgradeStack = new ItemStack(ModItems.UPGRADE_TOME);
|
||||
LivingUpgrades.setUpgrade(upgradeStack, recipe.getRecipeOutput());
|
||||
return Collections.singletonList(upgradeStack);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
||||
{
|
||||
// ArrayList<String> ret = new ArrayList<String>();
|
||||
// if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34)
|
||||
// {
|
||||
// ret.add(TextHelper.localize("jei.BloodMagic.recipe.lpDrained", recipe.getLpDrained()));
|
||||
// ret.add(TextHelper.localize("jei.BloodMagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
||||
// return ret;
|
||||
// }
|
||||
return null;
|
||||
ingredients.setOutput(ItemStack.class, upgradeStack);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue