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