Skip to content

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 ​

The identifier mods.magneticraft.thermopile will be used as the default on this page.

All Identifiers

Any of these can be used to refer to this compat:

groovy
mods.magneticraft.thermopile/* Used as page default */
mods.magneticraft.Thermopile

Adding Recipes ​

  • Add the given recipe to the recipe list:

    groovy
    mods.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.

Recipe Builder
  • Create the Recipe Builder.

    groovy
    mods.magneticraft.thermopile.recipeBuilder()

  • IBlockState. Sets the IBlockState being used. Requires not null.

    groovy
    state(IBlockState)
  • float. Sets the temperature of the block. (Default 0.0f).

    groovy
    temperature(float)
  • float. Sets the thermal resistance of the block. (Default 0.0f).

    groovy
    conductivity(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. (returns null or com.cout970.magneticraft.api.registries.generators.thermopile.IThermopileRecipe).

    groovy
    register()

Example
groovy
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:

    groovy
    mods.magneticraft.thermopile.remove(IThermopileRecipe)
  • Removes all recipes that match the given input:

    groovy
    mods.magneticraft.thermopile.removeByInput(IBlockState)
  • Removes all registered recipes:

    groovy
    mods.magneticraft.thermopile.removeAll()
Example
groovy
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:

    groovy
    mods.magneticraft.thermopile.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.