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

52 lines
1.4 KiB
Java
Raw Normal View History

2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.api.recipe;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import de.ellpeck.actuallyadditions.api.lens.Lens;
import net.minecraft.block.BlockState;
2016-01-05 04:47:35 +01:00
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.math.BlockPos;
2016-01-05 04:47:35 +01:00
public class LensConversionRecipe {
2016-01-05 04:47:35 +01:00
protected final Ingredient input;
protected final ItemStack output;
protected final int energy;
protected final Lens type;
2016-01-05 04:47:35 +01:00
@Deprecated
public LensConversionRecipe(ItemStack input, ItemStack output, int energy, Lens type) {
this(Ingredient.fromStacks(input), output, energy, type);
}
public LensConversionRecipe(Ingredient input, ItemStack output, int energy, Lens type) {
this.input = input;
this.output = output;
this.energy = energy;
this.type = type;
2016-01-05 04:47:35 +01:00
}
public boolean matches(ItemStack input, Lens lens) {
return this.input.test(input) && this.type == lens;
}
public Ingredient getInput() {
2019-02-27 19:53:05 +01:00
return this.input;
}
public ItemStack getOutput() {
2019-02-27 19:53:05 +01:00
return this.output;
}
public int getEnergyUsed() {
2019-02-27 19:53:05 +01:00
return this.energy;
}
public Lens getType() {
2019-02-27 19:53:05 +01:00
return this.type;
}
public void transformHook(ItemStack stack, BlockState state, BlockPos pos, IAtomicReconstructor tile) {
}
2016-01-05 04:47:35 +01:00
}