Skip to content

Compost (The Betweenlands)

Description

Converts an input itemstack into an amount of compost.

Identifier

Refer to this via any of the following:

groovy
mods.betweenlands.compost
mods.betweenlands.Compost
mods.thebetweenlands.compost/* Used as page default */
mods.thebetweenlands.Compost

Adding Recipes

  • Add the given recipe to the recipe list:

    groovy
    mods.thebetweenlands.compost.add(ICompostBinRecipe)

Recipe Builder

Just like other recipe types, the Compost also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.thebetweenlands.compost.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • int. Sets the time the recipe takes in ticks. Requires greater than or equal to 1. (Default 0).

    groovy
    time(int)
  • int. Sets the amount of compost output. Requires greater than or equal to 1. (Default 0).

    groovy
    amount(int)
  • 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 thebetweenlands.api.recipes.ICompostBinRecipe).

    groovy
    register()
Example
groovy
mods.thebetweenlands.compost.recipeBuilder()
    .input(item('minecraft:clay'))
    .amount(20)
    .time(30)
    .register()

mods.thebetweenlands.compost.recipeBuilder()
    .input(item('minecraft:gold_ingot'))
    .amount(1)
    .time(5)
    .register()

Removing Recipes

  • Removes the given recipe from the recipe list:

    groovy
    mods.thebetweenlands.compost.remove(ICompostBinRecipe)
  • Removes all recipes that match the given input:

    groovy
    mods.thebetweenlands.compost.removeByInput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.thebetweenlands.compost.removeAll()
Example
groovy
mods.thebetweenlands.compost.removeByInput(item('thebetweenlands:items_misc:13'))
mods.thebetweenlands.compost.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.thebetweenlands.compost.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.