![JAR search and dependency download from the Maven repository](/logo.png)
mmb.content.electric.machines.ProcessorSimpleCatalyzedBlock Maven / Gradle / Ivy
/**
*
*/
package mmb.content.electric.machines;
import mmb.NN;
import mmb.content.electric.ElectricMachineGroup.ElectroMachineType;
import mmb.content.electric.helper.Helper;
import mmb.content.electric.helper.SimpleProcessHelper;
import mmb.content.electric.recipes.SimpleRecipe;
import mmb.content.electric.recipes.SimpleRecipeGroup;
import mmb.engine.inv.storage.SingleItemInventory;
/**
* Runs a stacked or single, catalyzed recipe. The catalyst selects the recipe from the pool of valid recipes with the same item.
* @author oskar
* @param type of recipes
*/
public class ProcessorSimpleCatalyzedBlock<@NN Trecipe extends SimpleRecipe> extends ProcessorAbstractBlock{
//Constructor
public ProcessorSimpleCatalyzedBlock(ElectroMachineType type, SimpleRecipeGroup group) {
super(type);
this.recipes = group;
helper = new SimpleProcessHelper<>(group, in, out0, type.powermul, elec, type.volt, catalyst);
}
//Contents
@NN public final SingleItemInventory catalyst = new SingleItemInventory();
@Override
public @NN SingleItemInventory catalyst() {
return catalyst;
}
/** The recipe group used for this machine */
public final SimpleRecipeGroup> recipes;
@Override
public SimpleRecipeGroup> recipes() {
return recipes;
}
@NN private final SimpleProcessHelper helper;
@Override
public SimpleProcessHelper helper() {
return helper;
}
//Block methods
@Override
protected ProcessorAbstractBlock copy0() {
ProcessorSimpleCatalyzedBlock copy = new ProcessorSimpleCatalyzedBlock(type, recipes);
copy.helper.set(helper);
copy.catalyst.setContents(catalyst.getContents());
return copy;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy