mmb.content.electric.machines.ProcessorComplexCatalyzedBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
The newest version!
/**
*
*/
package mmb.content.electric.machines;
import mmb.NN;
import mmb.content.electric.ElectricMachineGroup.ElectroMachineType;
import mmb.content.electric.helper.ComplexProcessHelper;
import mmb.content.electric.recipes.ComplexCatRecipeGroup;
import mmb.content.electric.recipes.ComplexCatRecipeGroup.ComplexCatalyzedRecipe;
import mmb.engine.inv.storage.SingleItemInventory;
/**
* Runs a complex, catalyzed recipe. The catalyst selects the recipe from the pool of valid recipes with the same items.
* @author oskar
*/
public class ProcessorComplexCatalyzedBlock extends ProcessorAbstractBlock{
//Constructor
public ProcessorComplexCatalyzedBlock(ElectroMachineType type, ComplexCatRecipeGroup group) {
super(type);
this.recipes = group;
helper = new ComplexProcessHelper<>(group, in, out0, type.powermul, elec, type.volt, catalyst);
}
//Contents
@NN public final ComplexCatRecipeGroup recipes;
@Override
public ComplexCatRecipeGroup recipes() {
return recipes;
}
@NN public final SingleItemInventory catalyst = new SingleItemInventory();
@Override
public SingleItemInventory catalyst() {
return catalyst;
}
@NN private final ComplexProcessHelper<@NN ComplexCatalyzedRecipe> helper;
@Override
public ComplexProcessHelper<@NN ComplexCatalyzedRecipe> helper() {
return helper;
}
//Block methods
@Override
protected ProcessorAbstractBlock copy0() {
ProcessorComplexCatalyzedBlock copy = new ProcessorComplexCatalyzedBlock(type, recipes);
copy.catalyst.setContents(catalyst.getContents());
copy.helper.set(helper);
return copy;
}
}