ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java
Shadows_of_Fire 5c149648da More major updating
Migrates the rest of the recipe system to Ingredient inputs, Migrates
the compost to an IBakedModel instead of a TESR
2018-06-23 20:44:47 -04:00

56 lines
1.4 KiB
Java

/*
* This file ("CrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
public class CrusherRecipe {
protected Ingredient input;
protected ItemStack outputOne;
protected ItemStack outputTwo;
protected int outputChance;
@Deprecated
public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
this(Ingredient.fromStacks(input), outputOne, outputTwo, outputChance);
}
public CrusherRecipe(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
this.input = input;
this.outputOne = outputOne;
this.outputTwo = outputTwo;
this.outputChance = outputChance;
}
public boolean matches(ItemStack stack) {
return input.apply(stack);
}
public ItemStack getOutputOne() {
return outputOne;
}
public ItemStack getOutputTwo() {
return outputTwo;
}
public int getSecondChance() {
return outputChance;
}
public Ingredient getInput() {
return input;
}
}