Updated JEI compat to use VanillaTypes once again.
This commit is contained in:
parent
7ab571bcc7
commit
430f534b3a
10 changed files with 26 additions and 22 deletions
|
@ -25,6 +25,7 @@
|
||||||
package techreborn.compat.jei;
|
package techreborn.compat.jei;
|
||||||
|
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -99,8 +100,8 @@ public abstract class BaseRecipeWrapper<T extends BaseRecipe> implements IRecipe
|
||||||
public void getIngredients(
|
public void getIngredients(
|
||||||
@Nonnull
|
@Nonnull
|
||||||
IIngredients ingredients) {
|
IIngredients ingredients) {
|
||||||
ingredients.setInputLists(ItemStack.class, inputs);
|
ingredients.setInputLists(VanillaTypes.ITEM, inputs);
|
||||||
ingredients.setOutputs(ItemStack.class, baseRecipe.getOutputs());
|
ingredients.setOutputs(VanillaTypes.ITEM, baseRecipe.getOutputs());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
|
|
|
@ -28,6 +28,7 @@ import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -83,7 +84,7 @@ public class RecipeUtil {
|
||||||
IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
|
IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
|
||||||
|
|
||||||
if (itemInputSlots != null) {
|
if (itemInputSlots != null) {
|
||||||
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
|
List<List<ItemStack>> inputs = ingredients.getInputs(VanillaTypes.ITEM);
|
||||||
for (int i = 0; i < inputs.size() && i < itemInputSlots.length; i++) {
|
for (int i = 0; i < inputs.size() && i < itemInputSlots.length; i++) {
|
||||||
int inputSlot = itemInputSlots[i];
|
int inputSlot = itemInputSlots[i];
|
||||||
guiItemStacks.set(inputSlot, inputs.get(i));
|
guiItemStacks.set(inputSlot, inputs.get(i));
|
||||||
|
@ -91,7 +92,7 @@ public class RecipeUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemOutputSlots != null) {
|
if (itemOutputSlots != null) {
|
||||||
List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
|
List<List<ItemStack>> outputs = ingredients.getOutputs(VanillaTypes.ITEM);
|
||||||
for (int i = 0; i < outputs.size() && i < itemOutputSlots.length; i++) {
|
for (int i = 0; i < outputs.size() && i < itemOutputSlots.length; i++) {
|
||||||
int outputSlot = itemOutputSlots[i];
|
int outputSlot = itemOutputSlots[i];
|
||||||
guiItemStacks.set(outputSlot, outputs.get(i));
|
guiItemStacks.set(outputSlot, outputs.get(i));
|
||||||
|
@ -99,7 +100,7 @@ public class RecipeUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fluidInputSlots != null) {
|
if (fluidInputSlots != null) {
|
||||||
List<List<FluidStack>> fluidInputs = ingredients.getInputs(FluidStack.class);
|
List<List<FluidStack>> fluidInputs = ingredients.getInputs(VanillaTypes.FLUID);
|
||||||
for (int i = 0; i < fluidInputs.size() && i < fluidInputSlots.length; i++) {
|
for (int i = 0; i < fluidInputs.size() && i < fluidInputSlots.length; i++) {
|
||||||
int inputTank = fluidInputSlots[i];
|
int inputTank = fluidInputSlots[i];
|
||||||
guiFluidStacks.set(inputTank, fluidInputs.get(i));
|
guiFluidStacks.set(inputTank, fluidInputs.get(i));
|
||||||
|
@ -107,7 +108,7 @@ public class RecipeUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fluidOutputSlots != null) {
|
if (fluidOutputSlots != null) {
|
||||||
List<List<FluidStack>> fluidOutputs = ingredients.getOutputs(FluidStack.class);
|
List<List<FluidStack>> fluidOutputs = ingredients.getOutputs(VanillaTypes.FLUID);
|
||||||
for (int i = 0; i < fluidOutputs.size() && i < fluidOutputSlots.length; i++) {
|
for (int i = 0; i < fluidOutputs.size() && i < fluidOutputSlots.length; i++) {
|
||||||
int outputTank = fluidOutputSlots[i];
|
int outputTank = fluidOutputSlots[i];
|
||||||
guiFluidStacks.set(outputTank, fluidOutputs.get(i));
|
guiFluidStacks.set(outputTank, fluidOutputs.get(i));
|
||||||
|
|
|
@ -29,6 +29,7 @@ import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawableAnimated;
|
import mezz.jei.api.gui.IDrawableAnimated;
|
||||||
import mezz.jei.api.gui.IDrawableStatic;
|
import mezz.jei.api.gui.IDrawableStatic;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -57,13 +58,10 @@ public class FluidReplicatorRecipeWrapper implements IRecipeWrapper {
|
||||||
IDrawableAnimated.StartDirection.LEFT, false);
|
IDrawableAnimated.StartDirection.LEFT, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see mezz.jei.api.recipe.IRecipeWrapper#getIngredients(mezz.jei.api.ingredients.IIngredients)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients) {
|
public void getIngredients(IIngredients ingredients) {
|
||||||
ingredients.setInput(ItemStack.class, new ItemStack(ModItems.UU_MATTER, recipe.getInput()));
|
ingredients.setInput(VanillaTypes.ITEM, new ItemStack(ModItems.UU_MATTER, recipe.getInput()));
|
||||||
ingredients.setOutput(FluidStack.class, new FluidStack(recipe.getFluid(), Fluid.BUCKET_VOLUME));
|
ingredients.setOutput(VanillaTypes.FLUID, new FluidStack(recipe.getFluid(), Fluid.BUCKET_VOLUME));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,8 +29,8 @@ import mezz.jei.api.gui.IDrawable;
|
||||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.IRecipeCategory;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import reborncore.common.util.StringUtils;
|
import reborncore.common.util.StringUtils;
|
||||||
import techreborn.compat.jei.RecipeCategoryUids;
|
import techreborn.compat.jei.RecipeCategoryUids;
|
||||||
|
@ -88,7 +88,7 @@ public class FusionReactorRecipeCategory implements IRecipeCategory<FusionReacto
|
||||||
|
|
||||||
itemStacks.set(inputSlotTop, recipeWrapper.getTopInput());
|
itemStacks.set(inputSlotTop, recipeWrapper.getTopInput());
|
||||||
itemStacks.set(inputSlotBottom, recipeWrapper.getBottomInput());
|
itemStacks.set(inputSlotBottom, recipeWrapper.getBottomInput());
|
||||||
itemStacks.set(outputSlot, ingredients.getOutputs(ItemStack.class).get(0));
|
itemStacks.set(outputSlot, ingredients.getOutputs(VanillaTypes.ITEM).get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
package techreborn.compat.jei.fusionReactor;
|
package techreborn.compat.jei.fusionReactor;
|
||||||
|
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -43,8 +44,8 @@ public class FusionReactorRecipeWrapper implements IRecipeWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(@Nonnull IIngredients ingredients) {
|
public void getIngredients(@Nonnull IIngredients ingredients) {
|
||||||
ingredients.setInputs(ItemStack.class, Arrays.asList(baseRecipe.getTopInput(), baseRecipe.getBottomInput()));
|
ingredients.setInputs(VanillaTypes.ITEM, Arrays.asList(baseRecipe.getTopInput(), baseRecipe.getBottomInput()));
|
||||||
ingredients.setOutput(ItemStack.class, baseRecipe.getOutput());
|
ingredients.setOutput(VanillaTypes.ITEM, baseRecipe.getOutput());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getTopInput() {
|
public ItemStack getTopInput() {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawableAnimated;
|
import mezz.jei.api.gui.IDrawableAnimated;
|
||||||
import mezz.jei.api.gui.IDrawableStatic;
|
import mezz.jei.api.gui.IDrawableStatic;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
|
@ -60,6 +61,6 @@ public class FluidGeneratorRecipeWrapper implements IRecipeWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(final IIngredients ingredients) {
|
public void getIngredients(final IIngredients ingredients) {
|
||||||
ingredients.setInput(FluidStack.class, new FluidStack(this.baseRecipe.getFluid(), Fluid.BUCKET_VOLUME));
|
ingredients.setInput(VanillaTypes.FLUID, new FluidStack(this.baseRecipe.getFluid(), Fluid.BUCKET_VOLUME));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawableAnimated;
|
import mezz.jei.api.gui.IDrawableAnimated;
|
||||||
import mezz.jei.api.gui.IDrawableStatic;
|
import mezz.jei.api.gui.IDrawableStatic;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -63,7 +64,7 @@ public class IndustrialGrinderRecipeWrapper extends BaseRecipeWrapper<Industrial
|
||||||
public void getIngredients(
|
public void getIngredients(
|
||||||
@Nonnull
|
@Nonnull
|
||||||
final IIngredients ingredients) {
|
final IIngredients ingredients) {
|
||||||
ingredients.setInput(FluidStack.class, this.baseRecipe.fluidStack);
|
ingredients.setInput(VanillaTypes.FLUID, this.baseRecipe.fluidStack);
|
||||||
super.getIngredients(ingredients);
|
super.getIngredients(ingredients);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ import mezz.jei.api.IJeiHelpers;
|
||||||
import mezz.jei.api.gui.IDrawableAnimated;
|
import mezz.jei.api.gui.IDrawableAnimated;
|
||||||
import mezz.jei.api.gui.IDrawableStatic;
|
import mezz.jei.api.gui.IDrawableStatic;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -64,7 +65,7 @@ public class IndustrialSawmillRecipeWrapper extends BaseRecipeWrapper<Industrial
|
||||||
public void getIngredients(
|
public void getIngredients(
|
||||||
@Nonnull
|
@Nonnull
|
||||||
final IIngredients ingredients) {
|
final IIngredients ingredients) {
|
||||||
ingredients.setInput(FluidStack.class, this.baseRecipe.fluidStack);
|
ingredients.setInput(VanillaTypes.FLUID, this.baseRecipe.fluidStack);
|
||||||
super.getIngredients(ingredients);
|
super.getIngredients(ingredients);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.compat.jei.rollingMachine;
|
||||||
import mezz.jei.api.IGuiHelper;
|
import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.*;
|
import mezz.jei.api.gui.*;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
|
import mezz.jei.api.ingredients.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.IRecipeCategory;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import reborncore.common.util.StringUtils;
|
import reborncore.common.util.StringUtils;
|
||||||
import techreborn.compat.jei.RecipeCategoryUids;
|
import techreborn.compat.jei.RecipeCategoryUids;
|
||||||
|
@ -98,7 +98,7 @@ public class RollingMachineRecipeCategory implements IRecipeCategory<RollingMach
|
||||||
}
|
}
|
||||||
guiItemStacks.init(OUTPUT_SLOTS[0], false, 94, 18);
|
guiItemStacks.init(OUTPUT_SLOTS[0], false, 94, 18);
|
||||||
|
|
||||||
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class));
|
craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(VanillaTypes.ITEM));
|
||||||
guiItemStacks.set(OUTPUT_SLOTS[0], ingredients.getOutputs(ItemStack.class).get(0));
|
guiItemStacks.set(OUTPUT_SLOTS[0], ingredients.getOutputs(VanillaTypes.ITEM).get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ModInfo implements IModInfo {
|
||||||
public static final String MOD_NAME = "Tech Reborn";
|
public static final String MOD_NAME = "Tech Reborn";
|
||||||
public static final String MOD_ID = "techreborn";
|
public static final String MOD_ID = "techreborn";
|
||||||
public static final String MOD_VERSION = "@MODVERSION@";
|
public static final String MOD_VERSION = "@MODVERSION@";
|
||||||
public static final String MOD_DEPENDENCIES = "required-after:forge@[14.23.3.2694,);required-after:reborncore;after:jei@[4.7,);after:ic2";
|
public static final String MOD_DEPENDENCIES = "required-after:forge@[14.23.3.2694,);required-after:reborncore;after:jei@[4.12,);after:ic2";
|
||||||
public static final String SERVER_PROXY_CLASS = "techreborn.proxies.CommonProxy";
|
public static final String SERVER_PROXY_CLASS = "techreborn.proxies.CommonProxy";
|
||||||
public static final String CLIENT_PROXY_CLASS = "techreborn.proxies.ClientProxy";
|
public static final String CLIENT_PROXY_CLASS = "techreborn.proxies.ClientProxy";
|
||||||
public static final String GUI_FACTORY_CLASS = "techreborn.config.TechRebornGUIFactory";
|
public static final String GUI_FACTORY_CLASS = "techreborn.config.TechRebornGUIFactory";
|
||||||
|
|
Loading…
Reference in a new issue