2016-01-05 04:47:35 +01:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("LensConversionRecipe.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;
|
|
|
|
|
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;
|
2017-12-12 07:54:12 +01:00
|
|
|
import net.minecraft.block.state.IBlockState;
|
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) {
|
|
|
|
return this.input.apply(input) && this.type == lens;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Ingredient getInput() {
|
|
|
|
return input;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack getOutput() {
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getEnergyUsed() {
|
|
|
|
return energy;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Lens getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void transformHook(ItemStack stack, IBlockState state, BlockPos pos, IAtomicReconstructor tile) {
|
|
|
|
}
|
2016-01-05 04:47:35 +01:00
|
|
|
}
|