mmb.content.electric.machines.ProcessorSimpleCatalyzedBlock 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<
/**
*
*/
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.engine.craft.singles.SimpleRecipe;
import mmb.engine.craft.singles.SimpleRecipeGroup;
import mmb.engine.inv.storage.SingleItemInventory;
/**
* @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, 1000, 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;
}
}