mmb.content.electric.recipes.AbstractElectricRecipe 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.recipes;
import mmb.NN;
import mmb.content.electric.VoltageTier;
import mmb.engine.chance.Chance;
import mmb.engine.recipe.Recipe;
import mmb.engine.recipe.RecipeOutput;
/**
* A shared implementation of electric recipes
* @author oskar
* @param type of the recipe
*/
public abstract class AbstractElectricRecipe<@NN T extends Recipe> implements Recipe {
/** Energy required for completion in joules */
public final double energy;
/** Voltage tier required for this recipe */
public final VoltageTier voltage;
/** Deterministic output of this recipe */
public final RecipeOutput output;
/** Randomized output of this recipe */
public final Chance luck;
/**
* Base constructor for recipes
* @param energy energy required for completion in joules
* @param voltage voltage tier required for this recipe
* @param output deterministic output of this recipe
* @param luck randomized output of this recipe
*/
protected AbstractElectricRecipe(double energy, VoltageTier voltage, RecipeOutput output, Chance luck) {
this.energy = energy;
this.voltage = voltage;
this.output = output;
this.luck = luck;
}
@Override
public final RecipeOutput output() {
return output;
}
@Override
public final Chance luck() {
return luck;
}
@Override
public final double energy() {
return energy;
}
@Override
public final VoltageTier voltTier() {
return voltage;
}
}