Semi-Fluid Generator (Tech Reborn)
Description
Converts a fluidstack input into power, at a given rate per tick.
Identifier
Refer to this via any of the following:
mods.techreborn.semi_fluid_generator/* Used as page default */
mods.techreborn.semifluidgenerator
mods.techreborn.semiFluidGenerator
mods.techreborn.SemiFluidGenerator
Adding Recipes
Add the given recipe to the recipe list:
groovymods.techreborn.semi_fluid_generator.add(R)
Recipe Builder
Just like other recipe types, the Semi-Fluid Generator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.techreborn.semi_fluid_generator.recipeBuilder()
FluidStackList
. Sets the fluid inputs of the recipe. Requires exactly 1.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)
double
. Sets the total amount of energy generated from a bucket. Requires greater than 0. (Default0.0d
).groovyenergy(double)
double
. Sets the FE generated per tick. Requires greater than 0. (Default0.0d
).groovyperTick(double)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orreborncore.api.praescriptum.fuels.Fuel
).groovyregister()
Example
mods.techreborn.semi_fluid_generator.recipeBuilder()
.fluidInput(fluid('water'))
.energy(10000)
.perTick(500)
.register()
mods.techreborn.semi_fluid_generator.recipeBuilder()
.fluidInput(fluid('lava'))
.energy(200)
.perTick(10)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.techreborn.semi_fluid_generator.remove(R)
Removes all recipes that match the given input:
groovymods.techreborn.semi_fluid_generator.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.techreborn.semi_fluid_generator.removeAll()
Example
mods.techreborn.semi_fluid_generator.removeByInput(fluid('fluidbiofuel'))
mods.techreborn.semi_fluid_generator.removeAll()
Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.techreborn.semi_fluid_generator.streamRecipes()