ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CrusherRecipe.java

56 lines
1.5 KiB
Java
Raw Normal View History

2016-01-05 04:47:35 +01:00
/*
2016-05-16 22:52:27 +02:00
* This file ("CrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
2016-01-05 04:47:35 +01:00
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
2016-05-16 22:52:27 +02:00
* http://ellpeck.de/actaddlicense
2016-01-05 04:47:35 +01:00
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2017-01-01 16:23:26 +01:00
* © 2015-2017 Ellpeck
2016-01-05 04:47:35 +01:00
*/
package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
2016-01-05 04:47:35 +01:00
public class CrusherRecipe {
2016-01-05 04:47:35 +01:00
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 this.input.test(stack);
}
public ItemStack getOutputOne() {
2019-02-27 19:53:05 +01:00
return this.outputOne;
2016-01-05 04:47:35 +01:00
}
public ItemStack getOutputTwo() {
2019-02-27 19:53:05 +01:00
return this.outputTwo;
}
public int getSecondChance() {
2019-02-27 19:53:05 +01:00
return this.outputChance;
}
public Ingredient getInput() {
2019-02-27 19:53:05 +01:00
return this.input;
}
2016-01-05 04:47:35 +01:00
}