2016-05-20 17:55:33 +02:00
|
|
|
/*
|
|
|
|
* This file ("CompostRecipe.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
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2016-05-20 17:55:33 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.api.recipe;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
2018-06-24 02:44:47 +02:00
|
|
|
import net.minecraft.block.state.IBlockState;
|
2016-05-20 17:55:33 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2018-06-24 02:44:47 +02:00
|
|
|
import net.minecraft.item.crafting.Ingredient;
|
2016-05-20 17:55:33 +02:00
|
|
|
|
2019-05-02 09:10:29 +02:00
|
|
|
public class CompostRecipe {
|
2016-05-20 17:55:33 +02:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
protected final Ingredient input;
|
|
|
|
protected final ItemStack output;
|
|
|
|
protected final IBlockState inputDisplay;
|
|
|
|
protected final IBlockState outputDisplay;
|
2016-05-20 17:55:33 +02:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
@Deprecated
|
|
|
|
public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay) {
|
|
|
|
this(Ingredient.fromStacks(input), inputDisplay.getDefaultState(), output, outputDisplay.getDefaultState());
|
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2019-05-02 09:10:29 +02:00
|
|
|
public CompostRecipe(Ingredient input, IBlockState inputDisplay, ItemStack output, IBlockState outputDisplay) {
|
2016-05-20 17:55:33 +02:00
|
|
|
this.input = input;
|
|
|
|
this.output = output;
|
|
|
|
this.inputDisplay = inputDisplay;
|
|
|
|
this.outputDisplay = outputDisplay;
|
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public boolean matches(ItemStack stack) {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.input.apply(stack);
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public Ingredient getInput() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.input;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public ItemStack getOutput() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.output;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public IBlockState getInputDisplay() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.inputDisplay;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public IBlockState getOutputDisplay() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.outputDisplay;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2016-05-20 17:55:33 +02:00
|
|
|
|
|
|
|
}
|