2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.api.recipe;
|
|
|
|
|
2017-12-12 07:54:12 +01:00
|
|
|
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
2018-06-24 02:44:47 +02:00
|
|
|
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
2020-09-07 16:24:04 +02:00
|
|
|
import net.minecraft.block.BlockState;
|
2016-01-05 04:47:35 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2018-06-24 02:44:47 +02:00
|
|
|
import net.minecraft.item.crafting.Ingredient;
|
2017-12-12 07:54:12 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-01-05 04:47:35 +01:00
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
public class LensConversionRecipe {
|
2016-01-05 04:47:35 +01:00
|
|
|
|
2018-06-24 02:44:47 +02: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
|
|
|
|
2018-06-24 02:44:47 +02: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;
|
2016-05-14 14:14:06 +02:00
|
|
|
this.type = type;
|
2016-01-05 04:47:35 +01:00
|
|
|
}
|
2018-06-24 02:44:47 +02:00
|
|
|
|
|
|
|
public boolean matches(ItemStack input, Lens lens) {
|
2020-09-07 16:24:04 +02:00
|
|
|
return this.input.test(input) && this.type == lens;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack getOutput() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.output;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getEnergyUsed() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.energy;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Lens getType() {
|
2019-02-27 19:53:05 +01:00
|
|
|
return this.type;
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
|
|
|
|
2020-09-07 16:24:04 +02:00
|
|
|
public void transformHook(ItemStack stack, BlockState state, BlockPos pos, IAtomicReconstructor tile) {
|
2018-06-24 02:44:47 +02:00
|
|
|
}
|
2016-01-05 04:47:35 +01:00
|
|
|
}
|