mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Update JEI
This commit is contained in:
parent
691fabd5ef
commit
57f16ec321
13 changed files with 64 additions and 258 deletions
|
@ -45,7 +45,7 @@ repositories {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "net.darkhax.tesla:Tesla:1.10.2-1.2.1.49"
|
compile "net.darkhax.tesla:Tesla:1.10.2-1.2.1.49"
|
||||||
deobfCompile "mezz.jei:jei_1.10.2:3.13.0.335"
|
deobfCompile "mezz.jei:jei_1.10.2:3.13.2.360"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
@ -17,14 +17,14 @@ import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet;
|
||||||
import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton;
|
import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class RecipeWrapperWithButton implements IRecipeWrapper{
|
public abstract class RecipeWrapperWithButton extends BlankRecipeWrapper{
|
||||||
|
|
||||||
protected final TexturedButton theButton;
|
protected final TexturedButton theButton;
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,11 @@ import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
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.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class BookletRecipeCategory implements IRecipeCategory{
|
public class BookletRecipeCategory extends BlankRecipeCategory<BookletRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.booklet";
|
public static final String NAME = "actuallyadditions.booklet";
|
||||||
|
|
||||||
|
@ -31,7 +29,6 @@ public class BookletRecipeCategory implements IRecipeCategory{
|
||||||
this.background = helper.createBlankDrawable(160, 105);
|
this.background = helper.createBlankDrawable(160, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid(){
|
public String getUid(){
|
||||||
return NAME;
|
return NAME;
|
||||||
|
@ -50,26 +47,8 @@ public class BookletRecipeCategory implements IRecipeCategory{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawExtras(Minecraft minecraft){
|
public void setRecipe(IRecipeLayout recipeLayout, BookletRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawAnimations(Minecraft minecraft){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients){
|
|
||||||
if(recipeWrapper instanceof BookletRecipeWrapper){
|
|
||||||
BookletRecipeWrapper wrapper = (BookletRecipeWrapper)recipeWrapper;
|
|
||||||
recipeLayout.getItemStacks().init(0, true, 70, -4);
|
recipeLayout.getItemStacks().init(0, true, 70, -4);
|
||||||
recipeLayout.getItemStacks().set(0, Arrays.asList(wrapper.thePage.getItemStacksForPage()));
|
recipeLayout.getItemStacks().set(0, Arrays.asList(wrapper.thePage.getItemStacksForPage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ public class BookletRecipeHandler implements IRecipeHandler<BookletPage>{
|
||||||
return BookletRecipeCategory.NAME;
|
return BookletRecipeCategory.NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IRecipeWrapper getRecipeWrapper(BookletPage recipe){
|
public IRecipeWrapper getRecipeWrapper(BookletPage recipe){
|
||||||
return new BookletRecipeWrapper(recipe);
|
return new BookletRecipeWrapper(recipe);
|
||||||
|
|
|
@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
|
||||||
|
@ -34,27 +35,11 @@ public class BookletRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients){
|
public void getIngredients(IIngredients ingredients){
|
||||||
|
ingredients.setInputs(ItemStack.class, Arrays.asList(this.thePage.getItemStacksForPage()));
|
||||||
|
ingredients.setInputs(FluidStack.class, Arrays.asList(this.thePage.getFluidStacksForPage()));
|
||||||
|
|
||||||
}
|
ingredients.setOutputs(ItemStack.class, Arrays.asList(this.thePage.getItemStacksForPage()));
|
||||||
|
ingredients.setOutputs(FluidStack.class, Arrays.asList(this.thePage.getFluidStacksForPage()));
|
||||||
@Override
|
|
||||||
public List getInputs(){
|
|
||||||
return Arrays.asList(this.thePage.getItemStacksForPage());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getOutputs(){
|
|
||||||
return Arrays.asList(this.thePage.getItemStacksForPage());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidInputs(){
|
|
||||||
return Arrays.asList(this.thePage.getFluidStacksForPage());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidOutputs(){
|
|
||||||
return Arrays.asList(this.thePage.getFluidStacksForPage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,11 +16,11 @@ import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
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.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class CoffeeMachineRecipeCategory implements IRecipeCategory{
|
public class CoffeeMachineRecipeCategory extends BlankRecipeCategory<CoffeeMachineRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.coffee";
|
public static final String NAME = "actuallyadditions.coffee";
|
||||||
|
|
||||||
|
@ -30,43 +30,23 @@ public class CoffeeMachineRecipeCategory implements IRecipeCategory{
|
||||||
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiNEICoffeeMachine"), 0, 0, 126, 92);
|
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiNEICoffeeMachine"), 0, 0, 126, 92);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid(){
|
public String getUid(){
|
||||||
return NAME;
|
return NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle(){
|
public String getTitle(){
|
||||||
return StringUtil.localize("container.nei."+NAME+".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground(){
|
public IDrawable getBackground(){
|
||||||
return this.background;
|
return this.background;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawExtras(Minecraft minecraft){
|
public void setRecipe(IRecipeLayout recipeLayout, CoffeeMachineRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawAnimations(Minecraft minecraft){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients){
|
|
||||||
if(recipeWrapper instanceof CoffeeMachineRecipeWrapper){
|
|
||||||
CoffeeMachineRecipeWrapper wrapper = (CoffeeMachineRecipeWrapper)recipeWrapper;
|
|
||||||
|
|
||||||
recipeLayout.getItemStacks().init(0, true, 89, 20);
|
recipeLayout.getItemStacks().init(0, true, 89, 20);
|
||||||
recipeLayout.getItemStacks().set(0, wrapper.theIngredient.ingredient);
|
recipeLayout.getItemStacks().set(0, wrapper.theIngredient.ingredient);
|
||||||
|
|
||||||
|
@ -80,4 +60,3 @@ public class CoffeeMachineRecipeCategory implements IRecipeCategory{
|
||||||
recipeLayout.getItemStacks().set(3, wrapper.theOutput);
|
recipeLayout.getItemStacks().set(3, wrapper.theOutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -23,10 +23,8 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton{
|
public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
@ -45,31 +43,13 @@ public class CoffeeMachineRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients){
|
public void getIngredients(IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getInputs(){
|
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
list.add(this.theIngredient.ingredient);
|
list.add(this.theIngredient.ingredient);
|
||||||
list.add(this.cup);
|
list.add(this.cup);
|
||||||
list.add(this.coffeeBeans);
|
list.add(this.coffeeBeans);
|
||||||
return list;
|
ingredients.setInputs(ItemStack.class, list);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
ingredients.setOutput(ItemStack.class, this.theOutput);
|
||||||
public List getOutputs(){
|
|
||||||
return Collections.singletonList(this.theOutput);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidInputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidOutputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,11 +16,9 @@ import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
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.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
|
|
||||||
public class CrusherRecipeCategory implements IRecipeCategory{
|
public class CrusherRecipeCategory extends BlankRecipeCategory<CrusherRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.crushing";
|
public static final String NAME = "actuallyadditions.crushing";
|
||||||
|
|
||||||
|
@ -30,43 +28,23 @@ public class CrusherRecipeCategory implements IRecipeCategory{
|
||||||
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiGrinder"), 60, 13, 56, 79);
|
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiGrinder"), 60, 13, 56, 79);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid(){
|
public String getUid(){
|
||||||
return NAME;
|
return NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle(){
|
public String getTitle(){
|
||||||
return StringUtil.localize("container.nei."+NAME+".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground(){
|
public IDrawable getBackground(){
|
||||||
return this.background;
|
return this.background;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawExtras(Minecraft minecraft){
|
public void setRecipe(IRecipeLayout recipeLayout, CrusherRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawAnimations(Minecraft minecraft){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients){
|
|
||||||
if(recipeWrapper instanceof CrusherRecipeWrapper){
|
|
||||||
CrusherRecipeWrapper wrapper = (CrusherRecipeWrapper)recipeWrapper;
|
|
||||||
|
|
||||||
recipeLayout.getItemStacks().init(0, true, 19, 7);
|
recipeLayout.getItemStacks().init(0, true, 19, 7);
|
||||||
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.inputStack);
|
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.inputStack);
|
||||||
|
|
||||||
|
@ -79,4 +57,3 @@ public class CrusherRecipeCategory implements IRecipeCategory{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -35,32 +35,14 @@ public class CrusherRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients){
|
public void getIngredients(IIngredients ingredients){
|
||||||
|
ingredients.setInput(ItemStack.class, this.theRecipe.inputStack);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getInputs(){
|
|
||||||
return Collections.singletonList(this.theRecipe.inputStack);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getOutputs(){
|
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
list.add(this.theRecipe.outputOneStack);
|
list.add(this.theRecipe.outputOneStack);
|
||||||
if(this.theRecipe.outputTwoStack != null){
|
if(this.theRecipe.outputTwoStack != null){
|
||||||
list.add(this.theRecipe.outputTwoStack);
|
list.add(this.theRecipe.outputTwoStack);
|
||||||
}
|
}
|
||||||
return list;
|
ingredients.setOutputs(ItemStack.class, list);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidInputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidOutputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,11 +16,11 @@ import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
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.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class EmpowererRecipeCategory implements IRecipeCategory{
|
public class EmpowererRecipeCategory extends BlankRecipeCategory<EmpowererRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.empowerer";
|
public static final String NAME = "actuallyadditions.empowerer";
|
||||||
|
|
||||||
|
@ -40,31 +40,13 @@ public class EmpowererRecipeCategory implements IRecipeCategory{
|
||||||
return StringUtil.localize("container.nei."+NAME+".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground(){
|
public IDrawable getBackground(){
|
||||||
return this.background;
|
return this.background;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawExtras(Minecraft minecraft){
|
public void setRecipe(IRecipeLayout recipeLayout, EmpowererRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawAnimations(Minecraft minecraft){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients){
|
|
||||||
if(recipeWrapper instanceof EmpowererRecipeWrapper){
|
|
||||||
EmpowererRecipeWrapper wrapper = (EmpowererRecipeWrapper)recipeWrapper;
|
|
||||||
|
|
||||||
recipeLayout.getItemStacks().init(0, true, 31, 31);
|
recipeLayout.getItemStacks().init(0, true, 31, 31);
|
||||||
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.input);
|
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.input);
|
||||||
|
|
||||||
|
@ -84,4 +66,3 @@ public class EmpowererRecipeCategory implements IRecipeCategory{
|
||||||
recipeLayout.getItemStacks().set(5, wrapper.theRecipe.output);
|
recipeLayout.getItemStacks().set(5, wrapper.theRecipe.output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -35,27 +35,8 @@ public class EmpowererRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients){
|
public void getIngredients(IIngredients ingredients){
|
||||||
|
ingredients.setInputs(ItemStack.class, Arrays.asList(this.theRecipe.input, this.theRecipe.modifier1, this.theRecipe.modifier2, this.theRecipe.modifier3, this.theRecipe.modifier4));
|
||||||
}
|
ingredients.setOutput(ItemStack.class, this.theRecipe.output);
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getInputs(){
|
|
||||||
return Arrays.asList(this.theRecipe.input, this.theRecipe.modifier1, this.theRecipe.modifier2, this.theRecipe.modifier3, this.theRecipe.modifier4);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getOutputs(){
|
|
||||||
return Collections.singletonList(this.theRecipe.output);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidInputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidOutputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,12 +17,11 @@ import mezz.jei.api.IGuiHelper;
|
||||||
import mezz.jei.api.gui.IDrawable;
|
import mezz.jei.api.gui.IDrawable;
|
||||||
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.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||||
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;
|
||||||
|
|
||||||
public class ReconstructorRecipeCategory implements IRecipeCategory{
|
public class ReconstructorRecipeCategory extends BlankRecipeCategory<ReconstructorRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.reconstructor";
|
public static final String NAME = "actuallyadditions.reconstructor";
|
||||||
|
|
||||||
|
@ -33,19 +32,16 @@ public class ReconstructorRecipeCategory implements IRecipeCategory{
|
||||||
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiNEIAtomicReconstructor"), 0, 0, 96, 60);
|
this.background = helper.createDrawable(AssetUtil.getGuiLocation("guiNEIAtomicReconstructor"), 0, 0, 96, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUid(){
|
public String getUid(){
|
||||||
return NAME;
|
return NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle(){
|
public String getTitle(){
|
||||||
return StringUtil.localize("container.nei."+NAME+".name");
|
return StringUtil.localize("container.nei."+NAME+".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground(){
|
public IDrawable getBackground(){
|
||||||
return this.background;
|
return this.background;
|
||||||
|
@ -57,25 +53,11 @@ public class ReconstructorRecipeCategory implements IRecipeCategory{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawAnimations(Minecraft minecraft){
|
public void setRecipe(IRecipeLayout recipeLayout, ReconstructorRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper){
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients){
|
|
||||||
if(recipeWrapper instanceof ReconstructorRecipeWrapper){
|
|
||||||
ReconstructorRecipeWrapper wrapper = (ReconstructorRecipeWrapper)recipeWrapper;
|
|
||||||
|
|
||||||
recipeLayout.getItemStacks().init(0, true, 4, 18);
|
recipeLayout.getItemStacks().init(0, true, 4, 18);
|
||||||
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.inputStack);
|
recipeLayout.getItemStacks().set(0, wrapper.theRecipe.inputStack);
|
||||||
|
|
||||||
recipeLayout.getItemStacks().init(1, false, 66, 18);
|
recipeLayout.getItemStacks().init(1, false, 66, 18);
|
||||||
recipeLayout.getItemStacks().set(1, wrapper.theRecipe.outputStack);
|
recipeLayout.getItemStacks().set(1, wrapper.theRecipe.outputStack);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,27 +34,8 @@ public class ReconstructorRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getIngredients(IIngredients ingredients){
|
public void getIngredients(IIngredients ingredients){
|
||||||
|
ingredients.setInput(ItemStack.class, this.theRecipe.inputStack);
|
||||||
}
|
ingredients.setOutput(ItemStack.class, this.theRecipe.outputStack);
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getInputs(){
|
|
||||||
return Collections.singletonList(this.theRecipe.inputStack);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List getOutputs(){
|
|
||||||
return Collections.singletonList(this.theRecipe.outputStack);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidInputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FluidStack> getFluidOutputs(){
|
|
||||||
return new ArrayList<FluidStack>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue