Thermopile (Magneticraft)
Description
The Thermopile generates energy from temperature differences modified by the thermal resistances of the block. This lets you generate energy when placed on either side of a Thermopile.
Identifier
Refer to this via any of the following:
mods.magneticraft.thermopile/* Used as page default */
mods.magneticraft.Thermopile
Adding Recipes
Add the given recipe to the recipe list:
groovymods.magneticraft.thermopile.add(IThermopileRecipe)
Recipe Builder
Just like other recipe types, the Thermopile also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.magneticraft.thermopile.recipeBuilder()
IBlockState
. Sets the IBlockState being used. Requires not null.groovystate(IBlockState)
float
. Sets the temperature of the block. (Default0.0f
).groovytemperature(float)
float
. Sets the thermal resistance of the block. (Default0.0f
).groovyconductivity(float)
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
orcom.cout970.magneticraft.api.registries.generators.thermopile.IThermopileRecipe
).groovyregister()
Example
mods.magneticraft.thermopile.recipeBuilder()
.state(blockstate('minecraft:clay'))
.conductivity(10)
.temperature(500)
.register()
mods.magneticraft.thermopile.recipeBuilder()
.state(blockstate('minecraft:diamond_block'))
.conductivity(70)
.temperature(700)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.magneticraft.thermopile.remove(IThermopileRecipe)
Removes all recipes that match the given input:
groovymods.magneticraft.thermopile.removeByInput(IBlockState)
Removes all registered recipes:
groovymods.magneticraft.thermopile.removeAll()
Example
mods.magneticraft.thermopile.removeByInput(blockstate('minecraft:ice'))
mods.magneticraft.thermopile.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.magneticraft.thermopile.streamRecipes()